利用<math.h>,pow()函数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int i; int l,m,n; for(i=100;i<1…… 题解列表 2022年05月13日 0 点赞 0 评论 272 浏览 评分:0.0
最直接法判断 摘要:解题思路:这是最直接的思路,将数字分离,求立方和相加,判断是不是相等,即可注意事项:水仙花是三位数,就是100到999,指定了范围参考代码:#include<stdio.h>int main(){ i…… 题解列表 2022年05月12日 0 点赞 0 评论 873 浏览 评分:9.9
1016: [编程入门]水仙花数判断 摘要:import java.io.*; /** * 从 100 循环到 1000,用三个 int 分别保存百位、十位和个位。 */ public class Main { p…… 题解列表 2022年05月11日 0 点赞 0 评论 225 浏览 评分:0.0
刚来只会用基础语句求解。。 摘要:解题思路:参考题目给出的信息,判断水仙花数的关键就是需要将3位数分别拆开,看了一下大佬写的题解,是这么个理,但是还没学到这个用法,就自己搞了一个比较基础的版本。。用整除和取余来得到3个数字。注意事项:…… 题解列表 2022年05月10日 0 点赞 0 评论 343 浏览 评分:0.0
水仙花数判断 题解(c++拆分) 摘要:解题思路:要求拆分再判断是否为是否符合要求,如符合,便输出。注意事项:无。参考代码:#include<bits/stdc++.h>using namespace std;int a,b,c;int m…… 题解列表 2022年05月08日 0 点赞 0 评论 174 浏览 评分:0.0
小白也能懂的入门代码 摘要:解题思路:注意事项:参考代码:for i in range(100,1000): a,b,c=str(i) if int(a)**3+int(b)**3+int(c)**3==int(i)…… 题解列表 2022年05月02日 0 点赞 0 评论 297 浏览 评分:8.7
[编程入门]水仙花数判断 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,i; for(i=100; i<1000; i++){ a = i…… 题解列表 2022年04月29日 0 点赞 0 评论 238 浏览 评分:9.9
水仙花数判断 摘要:解题思路:根据水仙花数的特点注意事项:缩进参考代码:for i in range(100,1000): a = i//100 b = i%100//10 c = i%10 if…… 题解列表 2022年04月25日 0 点赞 0 评论 259 浏览 评分:0.0
[编程入门]水仙花数判断-题解(各语言代码) 摘要:**python** ```python print(*filter(lambda x:sum(map(lambda y:int(y)**3,str(x)))==x,range(100,1000)…… 题解列表 2022年04月14日 0 点赞 0 评论 235 浏览 评分:0.0
while循环的理解 摘要:解题思路:注意事项:参考代码:#include"stdio.h"int pow(int n) { int sum = 1; int i = 0; while (i < 3) { sum *= n; …… 题解列表 2022年04月12日 0 点赞 0 评论 166 浏览 评分:0.0