Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
85165 王珠潏 100~999的水仙花数 C++ Accepted 1 MS 264 KB 262 2024-07-16 16:48:19

Tests(1/1):


Code:

#include<iostream> using namespace std; int main(){ int g,s,b; for(int a=100;a<=999;a++){ g=a%10; s=a/10%10; b=a/100; if(g*g*g+s*s*s+b*b*b==a){ cout<<a<<" "; } } return 0; }