解题思路:
注意事项:
参考代码:
#include<iostream> #include<cstring> #include<cmath> using namespace std; int main() { int m,n; while(scanf("%d %d",&m,&n)!=EOF) { //The min number is 370,so if number less than 370 to not pass if(n<153) cout<<"no"; else for(int i=m;i<=n;i++) { int g,s,b; g=i%10; s=i/10%10; b=i/100; if(pow(g,3)+pow(s,3)+pow(b,3)==i) cout<<i<<" "; } cout<<endl; } return 0; }
0.0分
1 人评分
假币问题 (C++代码)(向上取整的一种处理方式)浏览:1660 |
【出圈】 (C语言代码)浏览:794 |
C二级辅导-阶乘数列 (C语言代码)浏览:688 |
WU-输出九九乘法表 (C++代码)浏览:1665 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:521 |
输入输出格式练习 (C语言代码)浏览:845 |
A+B for Input-Output Practice (IV) (C语言代码)浏览:503 |
C语言程序设计教程(第三版)课后习题11.8 (C语言代码)浏览:991 |
C语言程序设计教程(第三版)课后习题6.9 (C语言代码)浏览:479 |
1005答案错误为什么浏览:1975 |