| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 147147 | 孔声豪 | 判断完全数 | C++ | Compile Error | 0 MS | 0 KB | 287 | 2026-02-03 10:58:02 |
#include <iostream> using namespace std; int main(){ int n,m,s; m=s=0; cin>>n; while(m!=n){ m++; if(n%m=0){ s+=m; } } if(s++n){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } return 0; }
Main.cc: In function 'int main()':
Main.cc:9:15: error: lvalue required as left operand of assignment
if(n%m=0){
^
Main.cc:13:11: error: expected ')' before 'n'
if(s++n){
^