You are viewing a single comment's thread. Return to all comments →
I belive so far this is the most simple to understand PYTHON solution without the use of any fancy functions but just if else and loops.
sets=[] for i in range(len(ar)): for j in range(len(ar)): if i<j: if (ar[i]+ar[j])%k==0: sets.append((ar[i],ar[j])) return len(sets)
Seems like cookies are disabled on this browser, please enable them to open this website
Divisible Sum Pairs
You are viewing a single comment's thread. Return to all comments →
I belive so far this is the most simple to understand PYTHON solution without the use of any fancy functions but just if else and loops.