Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
64576 张江鹏 水仙花数II C++ Wrong Answer 2 MS 268 KB 449 2024-01-21 16:54:06

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n,zq2=0,zq=0,m,g=0,s=0,b=0,g2=0,s2=0,b2=0; cin>>n>>m; for(int x=0;x<=n;x++){ b=n/100; s=(n-100*b)/10; g=(n-100*b-10*s); if(g*g*g+s*s*s+b*b*b==n){ zq++; } } for(int x=0;x<=m;x++){ b2=m/100; s2=(m-100*b)/10; g2=(m-100*b-10*s); if(g2*g2*g2+s2*s2*s2+b2*b2*b2==m){ zq2++; } } if(zq2+zq!=2){ cout<<" no"; } return 0; }


Run Info:

------Input------
400 600
------Answer-----
407
------Your output-----
no