1016一行解(Python) 摘要:注意事项:强行一行,实际编程意义不大参考代码:for i in range(100, 999) : print(i) if sum(map(lambda x : x ** 3, list(map(in…… 题解列表 2022年11月04日 0 点赞 1 评论 740 浏览 评分:9.9
水仙花数简单理解版 摘要:解题思路:理清题意,水仙花数是三位数的注意事项:太简单了参考代码:for i in range(100,999): a = (i//100) b =(i//10)%10 c = i%…… 题解列表 2022年12月12日 0 点赞 2 评论 802 浏览 评分:9.9
水仙花数判断 摘要:解题思路:注意事项:萌新上路,请各位大佬指点;参考代码:方法一:运用字符与数字之间的相互转换,这个有点繁琐。public class Main { public static void main…… 题解列表 2022年12月30日 0 点赞 0 评论 1020 浏览 评分:9.9
水仙花数的另外解答 摘要:解题思路:看到很多解题思路都是把所有三位数全部试一遍,或许可以从水仙花数组成入手,将不是三位数的除去,得到水仙数。结果是一样的。若继续优化,还可以在三位全部算完之前将超过999的数字直接排除,比如第三…… 题解列表 2023年01月09日 0 点赞 0 评论 427 浏览 评分:9.9
水仙花数字while循环(C语言) 摘要:解题思路:注意事项:参考代码:#include "stdio.h"#include "math.h"int main(){ int i=2; while (i < 1000) { if ((p…… 题解列表 2023年01月15日 0 点赞 0 评论 545 浏览 评分:9.9
c++解题思路 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<math.h>using namespace std;int main(){ for(int i=100;i<…… 题解列表 2023年03月02日 0 点赞 0 评论 415 浏览 评分:9.9
水仙花数判断 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a,b,c,d; for(a=100;a<1000;a++) { b=…… 题解列表 2023年04月20日 0 点赞 0 评论 466 浏览 评分:9.9
使用for 循环语句 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { for (int n = 100; n < 1000;…… 题解列表 2023年09月04日 0 点赞 0 评论 411 浏览 评分:9.9
水仙花数判断 摘要:解题思路:首先表示这个三位数范围在100到999之间,再表示其百位,十位及个位数字。最后验证其百位,十位及个位数字的三次方之和是否等于该数字。注意事项:三个数字的表示参考代码:#include<std…… 题解列表 2023年10月30日 0 点赞 0 评论 448 浏览 评分:9.9
[编程入门]水仙花数判断 (C语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int x,a,b,c; x=100; while(x<=99…… 题解列表 2023年11月07日 0 点赞 0 评论 375 浏览 评分:9.9