|
|
back to boardWhy do I get WA??? var ok:array[1..10000]of longint; n,s,i,j,min:longint; nf,sf,max:longint; begin fillchar(ok,sizeof(ok),0); readln(n,s); ok[s]:=1;max:=0; for i:=s to n-1 do begin if i*2>=n then min:=n else min:=i*2; for j:=i+1 to min do if (ok[i]+1>ok[j])and(j*100 mod i=0) then ok[j]:=ok[i]+1; if max<ok[i] then max:=ok[i]; end; writeln(max); end. |
|
|