Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
141101 张文浩 100~999的水仙花数 C++ Compile Error 0 MS 0 KB 256 2025-12-21 11:32:27

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main (){ int a,i,d,f,g; for(i>=100;i<=999;i++){ d=a/100; f=a/10%10; g=a%10; if(d*d*d+f*f*f+g*g*g==a) cout<<i<<" "; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:7: warning: statement has no effect [-Wunused-value]
  for(i>=100;i<=999;i++){
       ^
Main.cc: At global scope:
Main.cc:17:2: error: expected unqualified-id before 'return'
  return 0;
  ^
Main.cc:18:1: error: expected declaration before '}' token
 }
 ^