Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
134326 张暄浩 100~999的水仙花数 C++ Presentation Error 1 MS 264 KB 483 2025-10-26 17:48:35

Tests(0/1):


Code:

#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() using namespace std; int main(){ int i,ge,shi,bai; for(i=100;i<1000;i++){ ge = i%10; shi = (i / 10)% 10; bai = i / 100; if(ge*ge*ge+shi*shi*shi+bai*bai*bai==i) cout<<i<<" "<<endl; } return 0; }