Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
115257 范恒恺 100~999的水仙花数 C++ Accepted 1 MS 264 KB 261 2025-03-30 08:38:10

Tests(1/1):


Code:

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