Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
12235 ElaineTang 求出100至999范围内的所有水仙花数。 C++ 解答错误 0 1 MS 256 KB 230 2025-07-08 17:25:36

Tests(0/1):


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


测评信息: