|
|
back to boardwhy my program got WA?Please help me! var a:array[1..10000]of integer; m,n,k,i,j:integer; begin fillchar(a,sizeof(a),0); readln(m,n,k); for i:=k+1 to 10000 do begin for j:=1 to trunc(sqrt(i)) do if i mod j=0 then a[i]:=a[i]+1; if (a[i]=n)and(a[i-k]=m) then begin writeln(i);halt;end; end; end. Re: why my program got WA?Please help me! because your algorithm is wrong |
|
|