2的n次方(大数版) 摘要:解题思路:注意事项:涉及高精度计算(用数组)参考代码:#include <stdio.h>int a[100000];int main(){ int k=1,n=0,i,j; scan…… 题解列表 2022年11月09日 1 点赞 2 评论 798 浏览 评分:8.0
C语言训练-计算:t=1-1/(2*2)-1/(3*3)-...-1/(m*m) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m; double t=1,i,b=0; scanf("%d",&m); for(i=2;i<=m;i+…… 题解列表 2022年11月09日 0 点赞 0 评论 430 浏览 评分:8.0
Sn的公式求和 摘要:解题思路:这道题主要是n个数相加,这个可以用到for循环,进行n次。1、2,22,222,....如何确定 我的思路是2=2*100 ,22=2*101+2 ,222=2*102+22(也就是前…… 题解列表 2022年11月09日 0 点赞 0 评论 329 浏览 评分:9.9
1142: C语言训练-立方和不等式,思路清晰,适合初学者 摘要: 思路:由于是相同指数的累加,所以我们首先就想到用pow()函数来进行遍历累加,这样节省很多时间。 关键在于理解了代码思路后,对输出答案的确定,题中说总和sum<=n,就意味着有两种情况,…… 题解列表 2022年11月09日 0 点赞 0 评论 580 浏览 评分:0.0
分糖果蓝桥杯真题做题完整思路 摘要:解题思路:先判断是否输入的N个数相等,相等跳出,有不相等的继续。给mid数组赋值。根据糖果得失列式子。判断是否为奇数糖果,是计数器和糖果数加一。循环操作1,2,3,4步,直到所有数相等。注意事项: …… 题解列表 2022年11月09日 0 点赞 0 评论 407 浏览 评分:9.9
数组逆序重放(easy) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,a[101]; cin>>n; for(int…… 题解列表 2022年11月09日 0 点赞 0 评论 734 浏览 评分:6.0
尾递归,大大减少运算时间 摘要:解题思路:递归注意事项:递归但是并不完全是递归,是尾递归,通过对于上次的结果的调用,大大减少运算时间。参考代码:#include <iostream>using namespace std;int a…… 题解列表 2022年11月09日 0 点赞 1 评论 252 浏览 评分:6.0
计算书费(简简单单) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){ double a[10] = { 2…… 题解列表 2022年11月09日 0 点赞 0 评论 583 浏览 评分:9.3
纯纯萌新写法 摘要:解题思路:纯数学方法注意事项:比较难看懂,纯萌新参考代码: #include<stdio.h> int main() { int n; scanf("%d",&n); int b=n; int…… 题解列表 2022年11月09日 0 点赞 0 评论 281 浏览 评分:9.9
与指定数字相同的数的个数 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a[100]={}, x, sum = 0, n; cin >…… 题解列表 2022年11月09日 0 点赞 0 评论 973 浏览 评分:8.4