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 1083. Factorials!!!

if u have wa 15(ADMINS read this)
Posted by v0id 5 Apr 2007 03:01
I tried to solve this test nearly 2 hours and always got WA.The problem was that numbers of "!" can be more than 20 (in 15 test). So my program with next code got wa:
char s[20]
int n;
scanf("%d %s",&n,&s);
int k = strlen(s);

i changed char s[20] to char s[100] and got ac. Admins, plz correct it.
You are wrong. 15 test is correct. (-)
Posted by Sandro (USU) 5 Apr 2007 11:29
Re: You are wrong. 15 test is correct. (-)
Posted by v0id 5 Apr 2007 14:15
so why i got ac after changing 20 to 100 ? 0_o
Re: You are wrong. 15 test is correct. (-)
Posted by Alias (Alexander Prudaev) 5 Apr 2007 17:02
please , send me your source code
String of 20 '!' has length 21. Remember about '\0' character. (-)
Posted by Sandro (USU) 5 Apr 2007 20:00