mannu_the_coder's blog

By mannu_the_coder, history, 10 years ago, In English

Hello everyone! I got a WA on test case 59 in the second question of Manthan 2k16 633B — A Trivial Problem in the system testing phase of Codeforces . But when I checked the judgement protocol after the contest , I found that my answer for test case 59 was displayed incorrectly . Actually the correct answer for test case 59 was 0 and I was getting the same correct answer on ideone.com (link — Click Here To See Ideone Solution, but there was a different answer given by the judgement protocol for this test case because of which I got a WA which should have been correct. I have also provided a screenshot of the judgement protocol for this question(submission no. 16359094) (link — Submission Page. This problem is not only with me , many of my friends have faced the same problem . Therefore, the authors of this contest are requested to look into this issue.

  • Vote: I like it
  • -22
  • Vote: I do not like it

| Write comment?
»
10 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Same thing happened with me :p

»
10 years ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

Write your own pow function.

»
10 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

just see these links you may find something common Link1 Link2 Link3 Link4 Link5 Link6 and correct answer

»
10 years ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

I am one of the authors of Manthan 2k16.

Sorry to say but your solution is incorrect. The 59th test case is m=99998. You have output 5 integers: n=[400000,400004], none of whose factorial has 99998 zeros.

»
10 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

This is a case where I like Python; a translation of your solution works (16387562) because pow will return an integer if appropriate, and can also do modulo exponentiation.