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 评论 202 浏览 评分:0.0
[简单易懂方法]水仙花数判断 摘要:解题思路:根据题意可知水仙花数为三位数,由此可以将水仙花数分为个位,十位,百位,按照提示 例如:153是一个水仙花数,因为153=1^3+5^3+3^3。即可解。注意事项:百位不能为0.参考代码:#i…… 题解列表 2022年02月22日 0 点赞 0 评论 296 浏览 评分:0.0
用for循环遍历数据panduan 摘要:解题思路:注意事项:这个代码能在vs上运行但答案错误不知道为啥参考代码:#include<iostream>using namespace std;int main(){ int a, b, c…… 题解列表 2022年02月26日 0 点赞 0 评论 157 浏览 评分: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 评论 160 浏览 评分: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 评论 144 浏览 评分:0.0
[编程入门]水仙花数判断(C语言) 摘要:解题思路: 1 )先利用for循环求出每一个三位数的百位,十位,个位的数是多少,其中利用要 / 取整, %取余 2)再利用for循环里面的if语句,利用水仙花数的公…… 题解列表 2022年04月02日 0 点赞 0 评论 387 浏览 评分: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
[编程入门]水仙花数判断-题解(各语言代码) 摘要:**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
水仙花数判断 摘要:解题思路:根据水仙花数的特点注意事项:缩进参考代码: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
水仙花数判断 题解(c++拆分) 摘要:解题思路:要求拆分再判断是否为是否符合要求,如符合,便输出。注意事项:无。参考代码:#include<bits/stdc++.h>using namespace std;int a,b,c;int m…… 题解列表 2022年05月08日 0 点赞 0 评论 175 浏览 评分:0.0