21 lines
610 B
Text
21 lines
610 B
Text
def N = 2200;
|
|
int A, B, C, D, AABB, AABBCC;
|
|
char R(N+1);
|
|
[FillMem(R, 0, N+1); \zero solution array
|
|
for A:= 1 to N do
|
|
[for B:= A to N do
|
|
[if (A&1 and B&1) = 0 then \for positive odd A and B, no solution
|
|
[AABB:= A*A + B*B;
|
|
for C:= B to N do
|
|
[AABBCC:= AABB + C*C;
|
|
D:= sqrt(AABBCC);
|
|
if AABBCC = D*D and D <= N then R(D):= 1; \solution
|
|
];
|
|
];
|
|
];
|
|
];
|
|
for A:= 1 to N do
|
|
if R(A) = 0 then
|
|
[IntOut(0, A); ChOut(0, ^ )]; \print non-solutions
|
|
CrLf(0);
|
|
]
|