Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
121876 鲁博睿 判断完全数 C++ Accepted 1 MS 268 KB 248 2025-06-08 17:31:15

Tests(10/10):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int a,b=0,c; cin>>a; for(int i=1;i<=a;i++){ if(a%i==0&&i!=a){ b=b+i; } } if(b==a){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } return 0; }