Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
7894 刘逸杭 判断完全数 C++ Accepted 0 MS 268 KB 225 2025-05-24 20:10:19

Tests(10/10):


Code:

#include<iostream> using namespace std; int main(){ int n,a,s=0; cin>>n; a=n; while(a>1){ a--; if(n%a==0) s+=a; } if(n==s) cout<<"YES"; else cout<<"NO"; return 0; }