All about problems in Volume 101. If there is a thread about your problem, please use it. If not, create one with its number in the subject.
Moderator: Board moderators
This Is ERFAN
- New poster
- Posts: 6
- Joined: Thu Dec 04, 2014 11:40 pm
Why getting time limit...?? Check it out plz..
Code: Select all
long long int a,i;
if(a==0) return 0;
long long int temp=a;
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
brianfry713 wrote:You can solve for each input value in constant time using sqrt().
Your algorithm O(n) is too slow.
Check input and AC output for thousands of problems on uDebug