Блог пользователя imtinanjibon

Автор imtinanjibon, история, 5 лет назад, По-английски

I am trying to solve https://mirror.codeforces.com/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 .

  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

»
5 лет назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

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://mirror.codeforces.com/contest/478/submission/81478816