|
|
back to boardWA Help please var n,i,j,ans:Integer; k:integer; kvoskl:string; begin ans:=1; j:=1; read(n,kvoskl); k:=length(kvoskl); i:=n; if n mod k = 0 then begin while i>=k do begin ans:=ans*i; i:=n-j*k; inc(j); end; end else begin while i>=n mod k do begin ans:=ans*i; i:=n-j*k; inc(j); end; end; writeln(ans); end. what`s wrong? |
|
|