|
|
вернуться в форумWhy I got WA? Послано qwt 7 фев 2002 06:09 var n,i:integer; begin readln(n); while n mod 2=0 do n:=n div 2; for i:=2 to n-1 do if n mod (i+1)=0 then break; writeln(i); end. Try a test N=7 (rigth answer=6) > var > n,i:integer; > begin > readln(n); > while n mod 2=0 do n:=n div 2; > for i:=2 to n-1 do if n mod (i+1)=0 then break; > writeln(i); > end. when input is 7,the output is 6, is right Послано qwt 8 фев 2002 10:14 |
|
|