while循环的理解 摘要:解题思路:注意事项:参考代码:#include"stdio.h"int pow(int n) { int sum = 1; int i = 0; while (i < 3) { sum *= n; …… 题解列表 2022年04月12日 0 点赞 0 评论 207 浏览 评分:0.0
编写题解 1016: [编程入门]水仙花数判断(python超短易理解) 摘要:解题思路:注意事项:参考代码:for i in range(100, 1000): if pow(int(str(i)[0]), 3) + pow(int(str(i)[1]), 3…… 题解列表 2022年04月09日 0 点赞 0 评论 435 浏览 评分:8.0
水仙花判断1016 摘要:解题思路:注意事项:这次不是判断你输出的数是不是水仙花而是在100到1000之内都有哪些水仙花参考代码:#include<stdio.h>int main(){ int a,b,c; for(int …… 题解列表 2022年04月03日 0 点赞 0 评论 336 浏览 评分:9.9
[编程入门]水仙花数判断(C语言) 摘要:解题思路: 1 )先利用for循环求出每一个三位数的百位,十位,个位的数是多少,其中利用要 / 取整, %取余 2)再利用for循环里面的if语句,利用水仙花数的公…… 题解列表 2022年04月02日 0 点赞 0 评论 437 浏览 评分: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 评论 181 浏览 评分:0.0
【编程入门】水仙花数判断 摘要:解题思路:水仙花数是三位数,n的范围为100-999 定义百位为b,十位为s,个位为g, g=n%10; s=n/10%1…… 题解列表 2022年03月20日 0 点赞 0 评论 321 浏览 评分:9.9
[编程入门]水仙花数判断 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int n,a,b,c; for(n=100;n<1000;n++) { …… 题解列表 2022年03月07日 0 点赞 0 评论 175 浏览 评分:7.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 评论 199 浏览 评分:0.0
用for循环遍历数据panduan 摘要:解题思路:注意事项:这个代码能在vs上运行但答案错误不知道为啥参考代码:#include<iostream>using namespace std;int main(){ int a, b, c…… 题解列表 2022年02月26日 0 点赞 0 评论 197 浏览 评分:0.0
[简单易懂方法]水仙花数判断 摘要:解题思路:根据题意可知水仙花数为三位数,由此可以将水仙花数分为个位,十位,百位,按照提示 例如:153是一个水仙花数,因为153=1^3+5^3+3^3。即可解。注意事项:百位不能为0.参考代码:#i…… 题解列表 2022年02月22日 0 点赞 0 评论 357 浏览 评分:0.0