#include <stdio.h> int main() { int i, j, k, a, b; // 外側ループ for (a = 3; a <= 1500; a++) { for (i = 1, j = 0; i < a; i++) { if (a % i == 0) { j += i; } } for (b = 2; b < a; b++) { for (i = 1, k = 0; i < b; i++) { if (b % i == 0) { k += i; } } if (j == b && k == a) { for (i = 2; i < a; i++) { if (a % i == 0) { } } for (i = 2; i < b; i++) { if (b % i == 0) { } } } } } return 0; }
Standard input is empty
284: 1, 2, 4, 71, 142 220: 1, 2, 4, 5, 10, 11, 20, 22, 44, 55, 110 1210: 1, 2, 5, 10, 11, 22, 55, 110, 121, 242, 605 1184: 1, 2, 4, 8, 16, 32, 37, 74, 148, 296, 592