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 1274. Fractional Arithmetic

Why WA#1?
Posted by Nisarg Shah 29 Dec 2008 19:33
My program passes the sample test given and also all the test cases given in discussion forum. But still I am getting WA#1. Can anybody tell me why?
Re: Why WA#1?
Posted by Nisarg Shah 29 Dec 2008 19:37
Strange...I had taken input through getline and removed last character if it was null or end of line. And I was getting wrong answer. But when I changed it to the condition, that remove last character if it is not from 0 to 9, it got AC.
Can anybody explain why?