imtinanjibon's blog

By imtinanjibon, history, 4 years ago, In English

I am trying to solve https://codeforces.net/contest/478/problem/B this problem. but in test case 4 it give me erron in codeforces compiler but in my pc it gives correct answer. how can i fix this? 81477732 .

  • Vote: I like it
  • +2
  • Vote: I do not like it

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

Maybe is because of the way your computer rounds doubles. I tried to put a + 0.5 to round it up and it passed the test 4 (but still got TLE). There can be another errors, since factorials with n = 1e9 can cause overflow

https://codeforces.net/contest/478/submission/81478816