ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1475. Ryaba Hen

WA 2
Posted by Abhishek Ghosh 25 Aug 2014 01:35
I have derived an expression which is giving correct results for the input given on the problem page as well as the ones below :

2
1000000 1 1
1000000000 1 1

500
15811

I got this set from another thread on this problem, however I am still getting WA on test 2. I am rounding off the result in Python :

round(abs(n))

and checking for the case when this will round to 0, which will happen for this case :

1 2 1

In which case I output 1.

What's special about test 2 ? Can I get a similar test or an idea about the special conditions which have to be checked ?