|
|
back to boardwhat is problem in my programmmmmmmmmmmmmmmmm Posted by Viktor 4 Jan 2008 17:13 uses crt; var x:longint; temp,bolen,i,j,n,k:integer; sad,a,b:array [1..100] of integer; begin clrscr; readln(n,k); for i:=1 to n do a[i]:=i; for i:=1 to k do b[i]:=i; for i:=1 to n-k do b[k+i]:=i; for i:=2 to n do begin for j:=2 to n do begin if a[i] mod b[j]=0 then begin a[i]:=a[i] div b[j]; b[j]:=1; end; if b[j] mod a[i]=0 then begin b[j]:=B[J] div a[i] ; a[i]:=1; end; end; end; x:=1; for i:=1 to n do x:=x*a[i]; bolen:=1; repeat temp:=0; if x mod bolen=0 then begin x:=x div bolen; inc(j); sad[j]:=bolen; end else bolen:=bolen+1; until x=1; for i:=1 to j do writeln(sad[i]); readln; end. |
|
|