You are viewing a single comment's thread. Return to all comments →
you could have done like this could reduce little more
for(int i=0;i<n;i++) { for(int j=i+1;j<n;j++) { if((a[i]+a[j])%k==0) { count++; } } }
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 →
you could have done like this could reduce little more