// 回答例のコードの一部 int fraternity(int num) { int n = 0; int i; for (i = 1; i * 2 <= num; i++) { if (num % i == 0 && num != i) { n += i; } } return n; }