2816: 统计满足条件的4位数个数 摘要:解题思路:注意事项:参考代码:n=int(input())a=[0]*na=list(map(str,input().split()))t=0def judgetrue(x): if int(i…… 题解列表 2024年07月06日 0 点赞 0 评论 157 浏览 评分:0.0
完数的判断c语言简单易懂(for循环+if条件语句) 摘要:解题思路:for循环+if条件语句注意事项:认真审题参考代码:#include<stdio.h>void fun(int n){ int i,s=0; for(i=1;i<n;i++){ …… 题解列表 2024年07月06日 0 点赞 4 评论 161 浏览 评分:8.0
完数的判断Wow! 摘要:解题思路:遍历从最小的完数到输入数字中间所有数字,先判断是否为完数(定义),然后输出,记得初始化count注意事项:要有count的初始化参考代码:#include<stdio.h>int main(…… 题解列表 2024年07月06日 0 点赞 1 评论 134 浏览 评分:9.9
不同单词个数统计(C语言):边读取单词边判断 摘要:解题思路:边读取单词边判断是否为新单词。若是则存储起来并且count+1,否则就忽略。注意事项:数组大小不妨定的大一些,以免不够用。循环中有中间变量时,记得更新变量的值。参考代码:#include<s…… 题解列表 2024年07月06日 0 点赞 0 评论 201 浏览 评分:9.9
1132最大数问题(while循环解决) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a; cin >> a; int b; if (a == -1…… 题解列表 2024年07月07日 0 点赞 0 评论 237 浏览 评分:0.0
1133阶乘的和(简单的动态规划) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; cin >> n; long long arr[25] …… 题解列表 2024年07月07日 0 点赞 0 评论 151 浏览 评分:0.0
1134求PI*(while循环) 摘要:解题思路:注意事项:答案是3.141591参考代码:#include<iostream>using namespace std;int main(){ double a = 1.0;//这是分子 do…… 题解列表 2024年07月07日 0 点赞 0 评论 249 浏览 评分:0.0
1135求s=a+aa+aaa+aaaa+aa...a的值(while循环) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){ int a, n; cin >> a >…… 题解列表 2024年07月07日 0 点赞 0 评论 202 浏览 评分:0.0
1136求具有abcd=(ab+cd)2性质的四位数(直接输出那三个数) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){ for (int i = 1000; i…… 题解列表 2024年07月07日 0 点赞 0 评论 150 浏览 评分:0.0
1137求函数值 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a = 10; int n; cin >> n; if (n …… 题解列表 2024年07月07日 0 点赞 0 评论 154 浏览 评分:0.0