code: https://ide.codingblocks.com/s/476488
problem: https://codeforces.com/contest/230/problem/B
test case:
1
999966000289
giving the correct answer on sublime but not on cf.
code: https://ide.codingblocks.com/s/476488
problem: https://codeforces.com/contest/230/problem/B
test case:
1
999966000289
giving the correct answer on sublime but not on cf.
still giving no
share ur sublime screenshot
I’m sorry I checked again and it is showing no there too
ur implemenation is wrong ,
compute all prime numbers upto 10^6
and store their square in set or map.
now for each qury if n is present in set or map then its t otherwise not
Am I using set correctly?
line 46,if it ==end then make false
but that will mean that the element is not found so why to make it false? because false is when element is perfect square
oh i though u r using f as flag to check wheter n is present in set or not.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.