编写题解 1016: [编程入门]水仙花数判断 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int i = 0; int a = 0, b = 0, c = 0; for(i…… 题解列表 2022年07月29日 0 点赞 0 评论 134 浏览 评分:0.0
用不同思路解题 摘要:解题思路:布尔值和整数运算判断注意事项:这题和1120一模一样参考代码:#include<stdio.h> int main() { _Bool f; for(int n=10…… 题解列表 2022年08月05日 0 点赞 0 评论 178 浏览 评分:0.0
小南解题-- [编程入门]水仙花数判断--54ms 摘要:b=[]for i in range(100,1000): i=str(i) if (int(i[0])**3+int(i[1])**3+int(i[2])**3)==int(i): …… 题解列表 2022年08月28日 0 点赞 0 评论 136 浏览 评分:0.0
1016——————水仙花数判断 摘要:充分理解概念:**水仙花数"是指一个三位数 其各位数字立方和等于该本身** for i in range(100,1000): #三位数 if (int(str(i…… 题解列表 2022年09月06日 0 点赞 0 评论 276 浏览 评分:0.0
"水仙花数判断"题解 摘要:解题思路:要判断一个数是不是水仙花数,就是在判断它的百、十、个位的立方是否等于它本身。要取一个数的百、十、个位:百:x/100;十:x%100/10;个:x%10.立方可以调用math.h库中的pow…… 题解列表 2022年09月11日 0 点赞 0 评论 329 浏览 评分:0.0
1016-水仙花数判断 语言:C++ 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){ int a,b,c=3; …… 题解列表 2022年10月04日 0 点赞 0 评论 154 浏览 评分:0.0
水仙花数判断 摘要: #include using namespace std; int main() { int a, b, c; for (int i = …… 题解列表 2022年10月10日 0 点赞 0 评论 88 浏览 评分:0.0
题目 1016: [编程入门]水仙花数判断—常规求解方法 摘要:解题思路:while循环注意事项:指数用pow函数或者其他形式参考代码:#include<stdio.h> #include<math.h> int main(void) { int i…… 题解列表 2022年10月21日 0 点赞 0 评论 173 浏览 评分:0.0
编写题解 1016: [编程入门]水仙花数判断 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,i; for(i=100;i<=999;i++) { a=i/100; b=i/10%1…… 题解列表 2022年11月23日 0 点赞 0 评论 91 浏览 评分:0.0
水仙花数的判断 摘要:解题思路:获取个位数:对数字取模于10获得个位数(%10)获取十位数:先整除10得到两位数(/10)再取模于10得到十位(%10)获取百位数:直接整除于100;注意事项:参考代码:#include<i…… 题解列表 2022年12月14日 0 点赞 0 评论 163 浏览 评分:0.0