Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
150346 赖泓宇 判断完全数 C++ Compile Error 0 MS 0 KB 457 2026-03-27 18:33:24

Tests(0/0):


Code:

#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"; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:11: error: expected primary-expression before '!=' token
     while(!=n){
           ^