10220 - I Love Big Numbers !
Moderator: Board moderators
10220 wa confused
i honestly don't know what could be wrong with my solution - i pregenerate the factorials (0! -> 1000! - not even stripping the zeros from the end), calculate the sums of the digits, the program runs in time (less than a second), but still it's wa.... there cannot be tricky cases, the standard input works fine, so do my handchecked examples... Is there a trick in the format of the input I missed? I mean, is the following description correct?
Input: one integer for each test case, input ends with EOF
Output: one integer per line
thanx in advance for ur help
Input: one integer for each test case, input ends with EOF
Output: one integer per line
thanx in advance for ur help
Dealing with failure is easy: Work hard to improve.
Success is also easy to handle: You've solved the wrong problem. Work hard to improve.
Success is also easy to handle: You've solved the wrong problem. Work hard to improve.
OK!
I`m not here to answer your question, but to make one...
Which king of variable did you use to keep the answer of the factorial.. I mean... its a pretty big number and I can`t make it work, well the biggest factorial I can answer is 25, rsrsrs...
Did you make a different way to work with that giant number??
Thanx Trinity
I`m not here to answer your question, but to make one...
Which king of variable did you use to keep the answer of the factorial.. I mean... its a pretty big number and I can`t make it work, well the biggest factorial I can answer is 25, rsrsrs...
Did you make a different way to work with that giant number??
Thanx Trinity
-
- Experienced poster
- Posts: 136
- Joined: Tue Apr 01, 2003 6:59 am
- Location: Jakarta, Indonesia
-
- New poster
- Posts: 22
- Joined: Fri Jan 17, 2003 8:24 am
Re: TLE 10220.
using array only 10000 , save the result into the array. that's linear timeZhao Le wrote:Can any one tell me the way how can speed up the #10220?
I got TLE.
-
- New poster
- Posts: 21
- Joined: Tue Jan 10, 2006 12:25 am
10220 - I Love Big Numbers !
My solution runs in reasonable ammount of time but i get wrong answer i tried every possible answer but i always got WA
can anyone help with test case that can determine whether my code runs correctly or not
(Note : i tried 0!)
thanks alot for your help
can anyone help with test case that can determine whether my code runs correctly or not
(Note : i tried 0!)
thanks alot for your help
-
- New poster
- Posts: 21
- Joined: Tue Jan 10, 2006 12:25 am
-
- Experienced poster
- Posts: 154
- Joined: Sat Apr 17, 2004 9:34 am
- Location: EEE, BUET
0 is most probably not in the judge input. However, here are some I/O for your testing.
Output->
Code: Select all
1
2
3
6
10
62
88
299
400
619
987
1000
Code: Select all
1
2
6
9
27
306
531
2448
3402
5841
10206
10539
You should never take more than you give in the circle of life.
-
- New poster
- Posts: 21
- Joined: Tue Jan 10, 2006 12:25 am
-
- Experienced poster
- Posts: 106
- Joined: Thu Jan 29, 2004 12:07 pm
- Location: Bangladesh
- Contact:
I think I havent understood your question right. The output for 987 is 10206, which was posted by Mohammad Mahmudur Rahman. But if you want to know the value of 987! then PM me.
Ami ekhono shopno dekhi...
HomePage
HomePage
Re: 10220 - I Love Big Numbers !
i cant figure it out why i'm getting RE..seems no error.i used almost the same code for 623 - Factorial Frequencies and got AC. but here incresed the string sizes as needed and getting RE! plz can any1 help me.. ![:(](./images/smilies/icon_frown.gif)
![:(](./images/smilies/icon_frown.gif)
Code: Select all
removed after AC
Do or do not. There is no try.