Zahra.H's blog

By Zahra.H, 9 years ago, In English

Hi everyone :) can anyone tell me why my code gives right answer for the first 4 test and it doesnt give the correct answer for the 5th one . i would really really appreciate your help :)

PS : i think my algorithm is correct thats why i dont want to read sb else's code :)

thanks :) http://codeforces.com/contest/415/submission/11136797

  • Vote: I like it
  • 0
  • Vote: I do not like it

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

Watch out for modulo. In solution() you are doing res+=smth; instead of res+=smth, res%=mod. 11137094