Hi everyone, I have recently participated in codeforces round #308 div2. My submission for problem got wrong answer on pretest 5th. After contest I checked output for same code on ideone (Ideone link here) and my local machine then got correct answer. I don't know why online judge of codeforces was showing wrong output. I request all of you to check on your local machine and let me know if my code is giving any error.
Probably because of pre-built pow function. Although I don't know why's it so.
Hi xlwinner11 , have you checked on your local machine?
plz let me know your output
Pow function gets warning on my version of gcc. So I'd rather code one myself. There it is.
UPD: WA5 on CF. Seems the trouble is caused with the solution itself. Sorry for the wrong idea.
your logic is wrong check it.
I can't figure out wrong logic by myself . can u plz tell me the same????