fork download
  1. type m=array[1..10000] of int64;
  2. var x:m;
  3. i:integer;
  4. begin
  5. x[1]:=3;
  6. x[2]:=9;
  7. for i:=3 to 10000 do
  8. begin
  9. x[i]:=2*x[i-2]+x[i-1];
  10. if x[i] mod 23 = 0 then writeln(x[i],' ',i);
  11. end;
  12. end.
  13.  
Success #stdin #stdout 0.02s 328KB
stdin
Standard input is empty
stdout
4194303 21
17592186044415 43