|
|
back to boardWhats wrong with my short code ???can anybody help me ??? Posted by Saber 18 Mar 2003 01:13 const maxn=10000; var n,i,j,s,k : integer; a : array[0..maxn] of integer; begin readln(n,s); fillchar(a,sizeof(a),0);a[s]:=1; for i:=s+1 to n do for j:=s to i-1 do if (i-j)*100 mod j = 0 then begin if a[j]+1>a[i] then a[i]:=a[j]+1; end; k:=0; for i:=s to n do if a[i]>k then k:=a[i]; writeln(k); end. |
|
|