Page 2 of 2

Posted: Fri Jan 09, 2004 8:47 am
by Per
Yeah, that is correct.

Also: the output for 5000 is 169820168825442121851975101689306431361757683049829233322203824652329144349.

Posted: Fri Jan 09, 2004 6:19 pm
by Alexander Kozlov
Thank you Per!

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

What about this one

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

HELP, please!

Posted: Fri Jan 09, 2004 6:29 pm
by Per
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.

Posted: Sat Jan 10, 2004 10:28 am
by shamim
What about 0,
the answer should be 1 :wink:

Posted: Mon Jan 12, 2004 9:56 am
by Dominik Michniewski
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

Posted: Mon Jan 12, 2004 12:31 pm
by Alexander Kozlov
Dear friends!

I got AC. The error was in long arithmetics.

My program outputs 1 for input 0.

Regards!