Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
64588 祝家懿 水仙花数II C++ Wrong Answer 1 MS 272 KB 360 2024-01-21 17:04:08

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*3+s*3+g*3==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-----
no