Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

BeardAspirant's blog

By BeardAspirant, history, 6 years ago, In English

There is a solution I am trying to submit on codeforces and its giving me wrong output. Now, there could be mistake on my end but what I can see is that the test case is the same that gets passed earlier. 34627657. Testcase 9 is equal to test case 2 which gets passed.

EDIT: Explain the downvotes :|

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

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

In test case 2 your output is YES, but in test case 9 it is NO. Look through your code.

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

I don't really know how IsProbablePrime(1) works, but docs say that for composite numbers it is correct with probability at least 1/2, but not always. So your code using some randomization and it is normal that it works differently on the same testcase.

And you get my downvote for phrase "Explain the downvotes". We don't have to explain anything to you,

  • »
    »
    6 years ago, # ^ |
    Rev. 2   Vote: I like it +10 Vote: I do not like it

    As I remember, 1 is the number of iterations in the primality test. So nothing strange here.

    People should read docs before using functions.