Блог пользователя Zahra.H

Автор Zahra.H, 9 лет назад, По-английски

Hi everyone i had a problem with this code. when i run that on my laptop it gives the correct answer but when i submit it CF says its wrong what should i do ??? here is my code

http://codeforces.com/contest/508/submission/10222184

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

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

It's probably an issue with floating-point precision when you use pow. Rewrite pow(10, j) using only integer arithmetic and you'll be OK.