编写题解 1120: C语言训练-"水仙花数"问题2 摘要:#include<stdio.h>int main(){ for(int i=100; i< 1000;i++) //三位数的范围 { int a, b, c; a = i % 10; …… 题解列表 2022年01月25日 0 点赞 0 评论 213 浏览 评分:0.0
1120: C语言训练-"水仙花数"问题2 摘要:解题思路:注意事项:参考代码:for n in range(100,1000): a=n%10 b=n//10%10 c=n//100 if(a**3+b**3+c**3==n…… 题解列表 2022年01月28日 0 点赞 0 评论 196 浏览 评分:0.0
Hifipsysta- 1120题-C语言训练-"水仙花数"问题2(C++代码)字符串转换法 摘要:```cpp #include #include #include using namespace std; bool is_narcissus(string str){ in…… 题解列表 2022年01月30日 0 点赞 0 评论 171 浏览 评分:0.0
python-水仙花数-问题2 摘要:解题思路:从100到1000内的水仙花数注意事项:参考代码:num=100while(num<1000): g=int(num%10)#个位 s=int(num/10%10)#十位 …… 题解列表 2022年02月04日 0 点赞 0 评论 298 浏览 评分:9.9
简单粗暴,通俗易懂 摘要:解题思路:三个数,分成个个数粗暴循环(每个三位数都尝试一遍);注意事项:是从100 开始循环,不是111参考代码:#include<bits/stdc++.h>using namespace std;…… 题解列表 2022年03月03日 0 点赞 0 评论 480 浏览 评分:9.9
用for - if 解决水仙花问题2 通俗易懂(C语言) 摘要:解题思路、注意事项:水仙花数是三位数,即100-999的数我们可以直接定义一个三位数,可以是999,也可以是100但是题目要求水仙花数从小到大输出,使用这种方法时,如果定义为999,就变成了从大到小直…… 题解列表 2022年03月05日 1 点赞 0 评论 966 浏览 评分:9.9
C语言训练-"水仙花数"问题2易理解,初学者 摘要:解题思路:因为是三位数,所以n的范围为100-999,可以用for遍历,在n小于1000的条件下,n自增,这样就可以在满足水仙花数的条件下可以按照从小到大的顺序输出。当然,如果是从n999-100自减…… 题解列表 2022年03月20日 0 点赞 0 评论 755 浏览 评分:9.9
编写题解 1120: C语言训练-"水仙花数"问题2 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<ctype.h>using namespace std;int main(){ int a,b,c; f…… 题解列表 2022年03月20日 0 点赞 0 评论 216 浏览 评分:0.0
C语言训练-"水仙花数"问题2 摘要:解题思路:把四个数算出来直接输出注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a,b,c,d;int main(){ cout…… 题解列表 2022年05月05日 0 点赞 0 评论 164 浏览 评分:0.0
有些问题还是没有解决 摘要:解题思路:注意事项:所以要注意参考代码:for i in range(100,1000): x=str(i) if i==(int(x[0])**3+int(x[1])**3+int(x[…… 题解列表 2022年05月13日 0 点赞 0 评论 170 浏览 评分:0.0