Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

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

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

I am trying to solve https://codeforces.me/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
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +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://codeforces.me/contest/478/submission/81478816