解题思路:
注意事项:
参考代码:
#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语言训练-计算t=1+1/2+1/3+...+1/n (C语言代码)浏览:869 |
买不到的数目 (C++代码)浏览:868 |
【出圈】 (C语言代码)浏览:796 |
C语言程序设计教程(第三版)课后习题1.5 (C++代码)浏览:1095 |
C语言程序设计教程(第三版)课后习题8.3 (C语言代码)浏览:575 |
母牛的故事 (C语言代码)浏览:716 |
1113题解浏览:789 |
蓝桥杯历届试题-翻硬币 (C++代码)浏览:892 |
演讲大赛评分 (C语言代码)浏览:1640 |
C二级辅导-求偶数和 (C语言代码)浏览:674 |