|
|
вернуться в форумIt AC! Funny solution uses SysUtils; var a : array[0..10000] of longint; n, m, i, x, y : longint; begin readln(n); if n = 1 then writeln(1) else if n mod 4 = 0 then writeln(0) else if (n mod 4 = 3) or (n = 25) or (n = 5) then writeln(2) else writeln(1); readln; end. Re: It AC! Funny solution i don't think it correct. how about 45 65 ? 85 ? 105 ? Re: It AC! Funny solution your code isn't always correct . you must use : if (n mod 4 = 1 and n mod 5 = 0) writeln(2) this is correct...
|
|
|