1016: [编程入门]水仙花数判断 稍稍复杂的循环判断
摘要:解题思路:就是简单循环判断题的加强版,设置范围,然后循环就好了。注意事项:参考代码:for i in range(100,1000): string=str(i) a=string[0] ……
编写题解 1016: [编程入门]水仙花数判断
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main() { int x,y,z; for(int a=100; a<1000; ……
编写题解 1016: [编程入门]水仙花数判断
摘要:解题思路:注意事项:参考代码:for i in range(100,1000): if i == pow(int(str(i)[0]),3)+pow(int(str(i)[1]),3)+p……
[编程入门]水仙花数判断
摘要:解题思路: 1.是个三位数 2.每位数的立方之和等于这个三位数本身 注意事项: 只输出水仙花数,不是水仙花数记得用continue继续for循环查找,直至找到所有水仙花数参考……
编写题解 1016: [编程入门]水仙花数判断
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i; int a,b,c; for(i=100;i<1000;i++){ a=i%10; ……