Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
141085 王安安 100~999的水仙花数 C++ Output Limit Exceeded 0 MS 268 KB 219 2025-12-21 11:27:15

Tests(0/1):


Code:

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