You are viewing a single comment's thread. Return to all comments →
c=0 for i in range(len(a)): for j in range(i+1,len(a)): if (a[i]+a[j])%k==0: c+=1 print(c)
Seems like cookies are disabled on this browser, please enable them to open this website
Divisible Pairs Sum
You are viewing a single comment's thread. Return to all comments →
c=0 for i in range(len(a)): for j in range(i+1,len(a)): if (a[i]+a[j])%k==0: c+=1 print(c)