|
|
back to boardwhy program a; var s:string; i:integer; n,k,sum:int64; begin readln(s); for i:=1 to length(s) do if (ord(s[i])>=48)and(ord(s[i])<=58) then n:=n*10+ord(s[i])-48 else k:=k+1; sum:=1; while n>0 do begin sum:=sum*n; n:=n-k; end; writeln(sum); end. test 1. |
|
|