You are viewing a single comment's thread. Return to all comments →
i also have same kind of logic. i think threre will not be any confusion now.
int count=0; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(i<j){ if((ar[i]+ar[j])%k==0){ count++; } } } } return 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 →
i also have same kind of logic. i think threre will not be any confusion now.