fork download
  1. var a:set of byte;
  2. i,j:integer;
  3. begin
  4. a:=[];
  5. for I := 1 to trunc(sqrt(256)) do
  6. for j := trunc(sqrt(256)) downto i do
  7. if ((sqr(i)+sqr(j))>=1) and ((sqr(i)+sqr(j))<=256) then
  8. a:=a+[(sqr(i)+sqr(j))];
  9. for I := 1 to 256 do
  10. if i in a then write(i,' ');
  11. readln;
  12. end.
Success #stdin #stdout 0.01s 4112KB
stdin
Standard input is empty
stdout
2 5 8 10 13 17 18 20 25 26 29 32 34 37 40 41 45 50 52 53 58 61 65 68 72 73 74 80 82 85 89 90 97 98 100 101 104 106 109 113 116 117 122 125 128 130 136 137 145 146 148 149 153 157 160 162 164 169 170 173 178 180 181 185 193 194 197 200 202 205 208 212 218 221 225 226 229 232 233 234 241 242 244 245 250