You are viewing a single comment's thread. Return to all comments →
c++ almost complete all test cases
int solve(long x) { long total = 0; int i = 1; while(true){ total += (i * i); if(total>x){ break; } i++; } return --i; }
Seems like cookies are disabled on this browser, please enable them to open this website
Little Ashish's Huge Donation
You are viewing a single comment's thread. Return to all comments →
c++ almost complete all test cases