| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 134605 | 何旻慧 | 判断完全数 | C++ | Accepted | 1 MS | 272 KB | 481 | 2025-10-29 19:01:57 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int sum=0,j=1,i; cin>>i; while(i!=j){ if(i%j==0){ sum+=j; } j+=1; } if(sum==i){ cout<<"YES";} else { cout<<"NO"; } return 0; }