| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 150345 | 赖泓宇 | 判断完全数 | C++ | Compile Error | 0 MS | 0 KB | 914 | 2026-03-27 18:33:15 |
#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 n=0,i=1,s=0; cin>>n; while(!=n){ if(n%i==0){ s=s+i; } i++; } if(n%s==0){ cout<<"YES"; }else{ }cout<<"NO"; }#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 n=0,i=1,s=0; cin>>n; while(!=n){ if(n%i==0){ s=s+i; } i++; } if(n%s==0){ cout<<"YES"; }else{ }cout<<"NO"; }
Main.cc:21:2: error: stray '#' in program
}#include // cin\cout\endl
^
Main.cc: In function 'int main()':
Main.cc:10:11: error: expected primary-expression before '!=' token
while(!=n){
^
Main.cc: At global scope:
Main.cc:21:3: error: 'include' does not name a type
}#include // cin\cout\endl
^
Main.cc: In function 'int main()':
Main.cc:27:5: error: redefinition of 'int main()'
int main(){
^
Main.cc:7:5: note: 'int main()' previously defined here
int main(){
^
Main.cc:30:11: error: expected primary-expression before '!=' token
while(!=n){
^