## 10590 - Boxes of Chocolates Again

Moderator: Board moderators

Per
A great helper
Posts: 429
Joined: Fri Nov 29, 2002 11:27 pm
Location: Sweden
Yeah, that is correct.

Also: the output for 5000 is 169820168825442121851975101689306431361757683049829233322203824652329144349.

Alexander Kozlov
New poster
Posts: 23
Joined: Sun Jun 15, 2003 4:45 pm
Location: Ukraine
Thank you Per!

My programs produces the same output for 5000, but I still get WA!
What can be the cause?

INPUT

10
9
8
7
6
5
4
3
2
1
3234
423
567
123
23
34
76
34
87
324
1969
4999

OUTPUT

42
30
22
15
11
7
5
3
2
1
99538594492809222469473074667593323441246751999382660193320
27253164546230421739
83983162210640880002321
2552338241
1255
12310
9289091
12310
38887673
49005643635237875
1964061380567012302624155966071951926644451875
166800841969169335828987218802327547808425240948910985503607178177016413875

Per
A great helper
Posts: 429
Joined: Fri Nov 29, 2002 11:27 pm
Location: Sweden
Those outputs are correct as well. That's strange, it's not like there are any particularly "tricky" inputs... If you want, I can look at your code and try to see what is wrong. Just send me a PM.

shamim
A great helper
Posts: 498
Joined: Mon Dec 30, 2002 10:10 am
Location: Bozeman, Montana, USA

Dominik Michniewski
Guru
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland
Contact:
The problem says that number should be positive so zero is bad input
Try to find if you have leading zeroes in answer - that's incorrect (I made such mistake first time )

Best regards
DM
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)

Alexander Kozlov
New poster
Posts: 23
Joined: Sun Jun 15, 2003 4:45 pm
Location: Ukraine
Dear friends!

I got AC. The error was in long arithmetics.

My program outputs 1 for input 0.

Regards!