|  | 
|  | 
| back to board | Why WA on test 8? Posted by ss  25 Mar 2005 20:53My code:---------------------------------
 |const a:array[1..20]of integer = (2,1,2,0,1,1,2,0,1,1,2,0,1,1,2,0,1,1,2,0);
 |
 |var n:integer;
 |
 |begin
 |  readln(n);
 |
 |  if n=1 then writeln(1) else
 |  if n=2 then writeln(1) else
 |  if n=3 then writeln(2) else
 |  if n=4 then writeln(0)
 |  else begin
 |   n:=(n mod 20)-4 ;
 |   writeln(a[n]);
 |  end;
 |end.
Re: Why WA on test 8? I used my AC program (who is actually brute force, keeping the last 3 digits) and for 101 yours outputs 0 and mine 1...Re: Why WA on test 8? Posted by ss  26 Mar 2005 22:57I found my stupid bag. | 
 | 
|