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

Автор hamidrh, 10 лет назад, По-английски

Hi to all sry if my English isn't good anyway at this problem B. Little Dima and Equation I tried this code my first try u can see It in test 1 ~~~~~ Input 3 2 8 Output 2 10 2008 Answer 3 10 2008 13726 Checker comment wrong answer 1st numbers differ — expected: '3', found: '2' ~~~~~

and NOW copy my code in your compiler and u can see it was correct in your pc why!!!! I tried a lot and I understood pow() in codeforces judge is ill :D

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

»
10 лет назад, # |
Rev. 2   Проголосовать: нравится +1 Проголосовать: не нравится

I don't know exactly, but I think pow() uses Taylor series, and for example pow(5, 5) can be little less or more than 625. But:

(int)(625 + eps) = 625

(int)(625 — eps) = 624

round() may fix this problem.

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

I changed your code a bit so it gets past the first test case. However, you have not accounted for the fact that the number must be greater than 0 and less than 10^9. Thus, it still gives wrong answer on test 10.

http://codeforces.com/contest/460/submission/7574790

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

You can not use pow function.You must write your pow function.That is not so hard :)

»
10 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится
»
10 лет назад, # |
Rev. 2   Проголосовать: нравится -8 Проголосовать: не нравится

I'm wondering if the ill thing in here is Codeforces..

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

because U use pow !!!