Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
79216 杜奕辰 判断完全数 C++ Compile Error 0 MS 0 KB 188 2024-06-30 15:18:20

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; for(int i=1;i<n;i++){ i=i=i; } if(n==i){ cout<<"YES"; }else{ cout<<"NO"; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:8: warning: operation on 'i' may be undefined [-Wsequence-point]
   i=i=i; 
        ^
Main.cc:9:8: error: 'i' was not declared in this scope
  if(n==i){
        ^