#1359拿错了

Kinghero King of the summit 2023-08-03 12:02:05 0
#include <bits/stdc++.h>
int main() {
	int a;
	std::cin>>a;
	for (int i = 6; i <= a; i++) {
		int sum = 0;
		for (int j = 1; j <= i - 1; j++)if (i % j == 0)sum += j;
		if (sum == i) std::cout<<i;
	}
}
{{ vote && vote.total.up }}

共 4 条回复

Ecky7 吉祥物

@root举报

Kinghero King of the summit
shaobai 老师

有多个答案没写换行

shaobai 老师