利用数学思维和for循环来解答,清晰明了 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,h; double S=0,s,H; scanf("%d",&h); H=h…… 题解列表 2024年11月26日 1 点赞 0 评论 263 浏览 评分:0.0
送分了........ 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b; double c=0; scanf("%d …… 题解列表 2024年11月26日 0 点赞 0 评论 180 浏览 评分:0.0
有规律的数列求和 摘要:解题思路:计算n次落地的高度,令高度为m,每次反弹都是原来的一半,所以可以用math.h库中的pow函数来计算0.5的n次方,即m * pow(0.5, n) 然后是总路…… 题解列表 2024年11月26日 0 点赞 0 评论 457 浏览 评分:0.0
最普通的解题方法 摘要:解题思路:注意事项:参考代码:#include<math.h>int main(){ int i,n,m; float s1=0,s2=0; scanf("%d %d",&n,&m)…… 题解列表 2024年11月26日 0 点赞 0 评论 230 浏览 评分:0.0
编写题解 1099: 校门外的树C++ 摘要:```cpp #include /* 文件头可以随便,我喜欢万能头,这里也可以(注意有memset函数,要用cstring库): #include #include */ using …… 题解列表 2024年11月26日 7 点赞 1 评论 796 浏览 评分:8.0
编写题解 1018: [编程入门]有规律的数列求和 摘要:解题思路: 后一项的分子为前一项分子分母的和,后一项的分母为前一项的分子,让他们循环相加。注意事项:参考代码:#include <stdio.h>int main(){ int n; f…… 题解列表 2024年11月26日 0 点赞 0 评论 500 浏览 评分:0.0
1094这样写更简单,C++ 摘要:解题思路: 一边接收输入一边接收输出注意事项:用getchar()来吸收输入n之后的回车参考代码:#include<iostream>#include<vector>using namespace s…… 题解列表 2024年11月26日 1 点赞 0 评论 567 浏览 评分:0.0
完数的判断 摘要:解题思路:for循环历遍所有数,每个数判断是否为 完数,即此数=因子之和,(与该数相除的余数为0的数为此数的因子),然后输出要求的数据注意事项:参考代码:#include <stdio.h> int …… 题解列表 2024年11月26日 0 点赞 0 评论 535 浏览 评分:0.0
stack_STL + 详细注释#1683: 数据结构-表达式求值(C++) 摘要:``` #define _CRT_SECURE_NO_WARNINGS 1 #include #include #include #include #include #include …… 题解列表 2024年11月26日 2 点赞 0 评论 311 浏览 评分:0.0
约瑟夫环问题的解答 摘要:解题思路:模拟or递归(这里解题基于我的代码)注意事项:1.使用模拟的话 一定要注意报数是迟于检查的 所以初始化count=1;每次元素退场后都需要初始化count=1. …… 题解列表 2024年11月26日 1 点赞 0 评论 407 浏览 评分:10.0