Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
7899 | 侯宜辰 | 判断完全数 | C++ | Wrong Answer | 0 MS | 260 KB | 328 | 2025-05-24 20:25:17 |
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int main(){ int n,s=0; cin>>n; for(int i=n-1;1==0;i--){ if(n%i==0){ s=s+i; } } if(n==s) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
------Input------
28
------Answer-----
YES
------Your output-----
NO