Zenith_053's blog

By Zenith_053, history, 17 months ago, In English

I don't understand why my code is giving TLE. It would be great if someone helps me out, I am really stuck in this question.

QUESTION SOLUTION

As for reference this code has been accepted REf. Code

Tags tle
  • Vote: I like it
  • -5
  • Vote: I do not like it

| Write comment?
»
17 months ago, # |
  Vote: I like it +12 Vote: I do not like it

Use long long i=2;i*i<=q;i++ to avoid overflow.