#include <stdio.h>
int main() {
// 1から10000までの整数を調べる
for (int n = 1; n <= 10000; n++) {
int k = 0;
// nの約数を求めて合計する
for (int i = 1; i < n; i++) {
if (n % i == 0) {
k+= i;
}
}
// 約数の合計がnと等しければ完全数
if (k == n) {
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKICAgIC8vIDHjgYvjgokxMDAwMOOBvuOBp+OBruaVtOaVsOOCkuiqv+OBueOCiwogICAgZm9yIChpbnQgbiA9IDE7IG4gPD0gMTAwMDA7IG4rKykgewogICAgICAgIGludAlrID0gMDsKICAgICAgICAKICAgICAgICAvLyBu44Gu57SE5pWw44KS5rGC44KB44Gm5ZCI6KiI44GZ44KLCiAgICAgICAgZm9yIChpbnQgaSA9IDE7IGkgPCBuOyBpKyspIHsKICAgICAgICAgICAgaWYgKG4gJSBpID09IDApIHsKICAgICAgICAgICAgICAgIGsrPSBpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIAogICAgICAgIC8vIOe0hOaVsOOBruWQiOioiOOBjG7jgajnrYnjgZfjgZHjgozjgbDlrozlhajmlbAKICAgICAgICBpZiAoayA9PSBuKSB7CiAgICAgICAgICAgIHByaW50ZigiJWRcbiIsIG4pOwogICAgICAgIH0KICAgIH0KCiAgICByZXR1cm4gMDsKfQ==