ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1295. Crazy Notions

It AC! Funny solution
Posted by Dmitry_GOLD 13 Dec 2012 01:07

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
Posted by staticor 9 Jul 2013 12:41
i don't think it correct.
how about   45   65 ?    85 ? 105 ?
Re: It AC! Funny solution
Posted by Adhambek 6 Dec 2013 23:28
your code isn't always correct .
you must use  :
 if (n mod 4 = 1 and n mod 5 = 0) writeln(2)
this is correct...