answer

yuchengyi3 2020-08-27 11:02:27 2020-08-27 11:06:35 17 返回题目

需要付费才能查看

¥50.00

微信[ ]       支付宝[ ]

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

#include <bits/stdc++.h>
using namespace std;
bool f(long long a)
{
	long long b=1;
	for (long long i=2; i*i<=a; ++i)
	{
		if (a%i==0)
		{
			b+=i;
			b+=a/i;
		}
	}
	if (b==a&&b!=1)
	{
		return true;
	}
	return false;
}
int main ()
{
	long long n;
	cin >> n;
	if (f(n))
	{
		cout << "yes" << endl;
		return 0;
	}
	cout << "no" << endl;
	return 0;
}
{{ vote && vote.total.up }}