ananth94's blog

By ananth94, history, 9 years ago, In English

I've been trying to solve this problem — 385C - Медведь и простые числа , Bear and Prime Numbers. My solution gives a completely expected runtime error on Testcase#4. Can someone please explain to me as to why this is happening?

My solution: http://codeforces.net/contest/385/submission/12629174

Any help would be greatly appreciated.

Thanks in advance.

EDIT: Solved. I had not taken into consideration that even l could be greater than 10000000.

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

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

Auto comment: topic has been updated by ananth94 (previous revision, new revision, compare).