summaryrefslogtreecommitdiff
path: root/progs/a321.py
blob: 35bcf86162a92ab47cf0a834150b245d9695d854 (plain)
1
2
3
4
5
6
7
8
9
10
def max_product(arr): 
    arr_len = len(arr) 
    if (arr_len < 2): 
        return None     
    x = arr[0]; y = arr[1]    
    for i in range(0, arr_len): 
        for j in range(i + 1, arr_len): 
            if (arr[i] * arr[j] > x * y): 
                x = arr[i]; y = arr[j] 
    return x,y