Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
82300 Kevin 100~999的水仙花数 C++ Accepted 0 MS 264 KB 245 2024-07-13 10:38:28

Tests(1/1):


Code:

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