You are viewing a single comment's thread. Return to all comments →
works but is hard to read... i would do
for(int i=0; i<n-1; i++){ for(int j=i+1;j<n;j++){ a = ar[i] + ar[j]; if (a % 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 →
works but is hard to read... i would do