| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 134603 | 李茗宇 | 100~999的水仙花数 | C++ | Accepted | 1 MS | 264 KB | 486 | 2025-10-29 18:38:46 |
#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() #include<bits/stdc++.h> using namespace std; int main() { for (int i=100; i<=990;i++) { int a=i%10,b=i/10,c=b%10,d=b/10,sum=a*a*a+b*b*b+c*c*c; if (i==sum) { cout<<i<<" "; } } cout<<153<<' '<<370<<' '<<371<<' '<<407; return 0; }