Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
64595 祝家懿 水仙花数II C++ Wrong Answer 2 MS 268 KB 375 2024-01-21 17:06:01

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; int b,s,g; int r[100],x=0,f=0; for(int i=n; i<m; i++) { b=i/100%10; s=i/10%10; g=i%10; if(b*b*b+s*s*s+g*g*g==i) { r[f]=i; x++; f++; } } if(x==0) { cout<<"no"; } else { for(int i=0; i<100; i++) { cout<<r[i]<<' '; } } return 0; }


Run Info:

------Input------
400 600
------Answer-----
407
------Your output-----
407 0 8010080 0 8046944 0 8050816 0 8014944 0 4742451 0 8045728 0 8046048 0 8049888 0 281357568 -224410306 8044680 0 8047520 0 0 0 8022832 0 8010080 0 8044460 0 8022248 0 4670610 0 121 0 72704 0 8047520 0 6 0 6 16 -803006319 -32768 1136 0 4545 1184 142 0 17 0 233 127 2 0 0 0 15775231 0 194 0 1 0 0 0 5211093 0 8042144 0 8034912 0 72704 0 8 0 1 0 32768 0 803006824 32767 9 0 0 0 4197376 0 8 0 1 0 803006808 32767 4827143 0