Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
1862 张宸瑜 判断完全数 C++ Compile Error 0 MS 0 KB 295 2023-11-25 17:45:36

Tests(0/0):


Code:

# include<cstdio> # include<iomanip> using namespace std; int main(){ int a,b=0; cin>>a; for(int i=1;i<=a-1;i++){ if(a%i==0){ b=b+i; } } if(a==b){ cout<<"YES"; } else{ cout<<"NO"; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:5: error: 'cin' was not declared in this scope
     cin>>a;
     ^
Main.cc:13:9: error: 'cout' was not declared in this scope
         cout<"YES";
         ^
Main.cc:16:9: error: 'cout' was not declared in this scope
         cout<<"NO";
         ^