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!!!

This Problem seems so easy...
Posted by JL Wang 13 Nov 2002 15:23
I can't imagine why you can't get AC?!?!?!?

Just look at my solution!!

below:
---------------------------------------------------------------------
program a1083;
var
st1:string;
s,s1,k,i:longint;
begin
     readln(st1);
     s:=0;
     for i:=1 to length(st1) do
         if st1[i]<>' ' then s:=s*10+ord(st1[i])-48 else break;
     k:=length(st1)-i;
     s1:=s;s:=1;
     repeat
           s:=s*s1;
           s1:=s1-k;
     until s1<=0;
     writeln(s);
end.