不知道为啥1不行
参考代码:
public static void main(String[] args){ for(int i=2;i<200000;i++){ int a=i/100000; int b=i/10000%10; int c=i/1000%10; int d=i%1000/100; int e=i%100/10; int f=i%10; int sum=(int) Math.pow(a, 5)+(int) Math.pow(b, 5)+(int) Math.pow(c, 5)+(int) Math.pow(d, 5)+(int) Math.pow(e, 5)+(int) Math.pow(f, 5); if(sum==i){ System.out.println(sum); } } }
0.0分
0 人评分
字符串比较 (C语言代码)答案错误????浏览:597 |
A+B for Input-Output Practice (IV) (C语言代码)浏览:451 |
C语言训练-求函数值 (C语言代码)浏览:575 |
wu-理财计划 (C++代码)浏览:833 |
WU-输入输出格式练习 (C++代码)浏览:1080 |
C语言程序设计教程(第三版)课后习题10.3 (C语言代码)浏览:1916 |
罗列完美数 (C语言代码)浏览:491 |
2006年春浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:344 |
妹子杀手的故事 (C语言代码)浏览:1052 |
整数平均值 (C语言代码)浏览:786 |