|
|
вернуться в форумwhi i get CM and what is wrong to my program,enubody can help meeeeeeeeeeeeeeeee!!!!!!!!!!!!!!!!!!!!!#???????????????????? var g,h,i,j,l,m,n:integer; k:int64; sg,si:byte; s:string; procedure readdata; begin read(n); readln (s); end; procedure solve; begin sg:=length(s)-1; k:=1; g:=1; for j:=1 to sg do begin if sg mod n <> 0 then begin if j=sg then k:=k*(n mod sg) else begin if g=1 then begin g:=2; k:=n*(n-j*sg); end else k:=k*(n-j*sg); end; end else begin if j=sg then k:=k*sg else begin if g=1 then begin g:=2; k:=n*(n-j*sg); end else k:=k*(n-j*sg); end; end; end; end; procedure print; begin writeln (k); end; begin readdata; solve; print; end. |
|
|