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 1048. Superlong Sums

Bug in tests?
Posted by Sandro 28 May 2004 16:51
I think that problem means that leading zeroes may be added, if one number is shorter than the other. But I'm sure that there is a test, where both numbers have leading zeroes. For example, smth like that:
4
0 0
0 0
9 0
5 1
I printed 96, but this is wrong. Correct output is 0096. Now I got AC.
Re: Bug in tests?
Posted by Sandro 28 May 2004 17:00
And, of course, may be situation like that:
5
0 0
9 0
9 0
9 0
9 2
Correct answer is 10001.
Re: Bug in tests?
Posted by Vladimir Yakovlev (USU) 29 May 2004 01:25
But why do you think it's a bug?

Quote from problem description:
"Output file should contain exactly N digits"
So, output "96" is wrong, but "0096" is right.
Re: Bug in tests?
Posted by Sandro 29 May 2004 19:36
The problem is not in wrong output, but in test.
"N(1<=N<=1000000) - the length of the integers (in order to make their lengths equal, some leading zeroes can be added)."
It means that this test is impossible and incorrect, because the length of 0095 is 2, the length of 0001 is 1. And because of leading zeroes are required only to make the length equal, correct input must be
2
9 0
5 1
Re: Bug in tests?
Posted by botl_ayhan 16 Jan 2006 21:31
thank you very very much. i found my bug.