fork download
  1. #include <cstdio>
  2. #include <algorithm>
  3. using namespace std;
  4.  
  5. int main() {
  6. for (int i = 1;i <= 100;++ i) {
  7. for (int j = i + 1;j <= 100;j += 2) {
  8. int a = min(j * j - i * i, 2 * j * i), b = abs(j * j - i * i - 2 * j * i), c = j * j + i * i;
  9. if (c + b < 200) printf("%d %d %d\n", a - (c - b) / 2, c - b >> 1, c + b >> 1);
  10. }
  11. }
  12. return 0;
  13. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
1 2 3
3 5 12
5 7 30
7 9 56
9 11 90
2 3 10
6 14 15
10 18 35
14 22 63
18 26 99
3 4 21
9 18 27
15 33 40
21 39 70
4 5 36
12 21 44
20 45 52
28 60 77
5 6 55
15 24 65
25 50 75
35 84 85
6 7 78
18 27 90