fork download
  1. program ideone;
  2. var
  3. Sn,temp: QWord;
  4. n:Integer;
  5. i:Integer;
  6. x:double;
  7. const Two: QWord = 2;
  8. begin
  9. readln(n);
  10. for i:=1 to n do begin
  11. temp:=Two*i*(i+1) + 1;
  12. x:= sqrt(temp);
  13. if(x*x = temp) then writeln(i);
  14. end;
  15. end.
Success #stdin #stdout 0s 232KB
stdin
200
stdout
3
20
119