[编程入门]水仙花数判断 摘要:解题思路:思考百位、十位、个位怎么表示注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,s,m=100; while(m<1000) { a=m/1…… 题解列表 2021年12月26日 0 点赞 0 评论 337 浏览 评分:0.0
水仙花数判断 摘要:参考代码:#include"bits/stdc++.h" using namespace std; int a[1111]; bool check(int z){ int q=0; in…… 题解列表 2022年01月20日 0 点赞 0 评论 373 浏览 评分:0.0
最简单的for循环问题 摘要:解题思路:利用for循环注意事项:%作为运算符是用来取余的,/是除法运算。参考代码:#include<stdio.h>int main(){ int i=100,a,b,c; for(i=…… 题解列表 2022年01月23日 0 点赞 0 评论 401 浏览 评分:0.0
水仙花数判断(c++易懂) 摘要:解题思路:使用for循环遍历所有三位数,再使用if语句找出各位数字立方和等于自己本身的数。注意事项:看注释参考代码:#include <iostream> using namespace std;…… 题解列表 2022年01月28日 0 点赞 0 评论 512 浏览 评分:0.0
编写题解 1016: [编程入门]水仙花数判断 摘要:解题思路:注意事项:参考代码:for x in range(100,1001): flag=0 for i in str(x): flag+=int(i)**3 if …… 题解列表 2022年02月04日 0 点赞 0 评论 481 浏览 评分:0.0
1016: [编程入门]水仙花数判断 摘要:解题思路:注意事项:参考代码:for i in range(100, 1000): if i == eval(str(i)[0])**3+eval(str(i)[1])**3+eval(str(…… 题解列表 2022年02月20日 0 点赞 0 评论 427 浏览 评分:0.0
[简单易懂方法]水仙花数判断 摘要:解题思路:根据题意可知水仙花数为三位数,由此可以将水仙花数分为个位,十位,百位,按照提示 例如:153是一个水仙花数,因为153=1^3+5^3+3^3。即可解。注意事项:百位不能为0.参考代码:#i…… 题解列表 2022年02月22日 0 点赞 0 评论 545 浏览 评分:0.0
用for循环遍历数据panduan 摘要:解题思路:注意事项:这个代码能在vs上运行但答案错误不知道为啥参考代码:#include<iostream>using namespace std;int main(){ int a, b, c…… 题解列表 2022年02月26日 0 点赞 0 评论 397 浏览 评分:0.0
编写题解 1016: [编程入门]水仙花数判断--解题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,i; for(i=100; i<1000; i++){ a = i…… 题解列表 2022年03月04日 0 点赞 0 评论 409 浏览 评分:0.0
[编程入门]水仙花数判断 摘要:解题思路:将三位数每一位分离出来是重点注意事项:参考代码:for i in range(100,1000): a=i%10 b=(i%100)/10 c=i/100 if i=…… 题解列表 2022年03月27日 0 点赞 0 评论 396 浏览 评分:0.0