最简的题解,等比公式求和 摘要:解题思路:要多利用数学公式注意事项:参考代码:b=int(input()) a=100*(1-0.5**b)*4-100 //路程是位移的两倍,减去一开始多算的100就行了 print(…… 题解列表 2022年10月27日 0 点赞 0 评论 448 浏览 评分:9.0
小白的初次尝试 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main (){ double sum=0.00,son=2.00,mom=1; int N; scanf("%d",&N); …… 题解列表 2022年10月27日 0 点赞 0 评论 321 浏览 评分:9.9
没用数组,简单处理 摘要:解题思路:没用数组参考代码:#include<iostream>using namespace std;int main(){ int i,s[9]; for(i=0;i<9;i++) c…… 题解列表 2022年10月27日 0 点赞 0 评论 344 浏览 评分:0.0
1084: 用筛法求之N内的素数 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int N; int j; scanf("%d",&N); for(int i=1;i<…… 题解列表 2022年10月27日 0 点赞 0 评论 318 浏览 评分:0.0
最全版 阶乘题解(迭代、递归) 摘要:解题思路: 这个题出的非常好,既可以用迭代法来求阶乘和,又可以使用函数递归来求,妙极了。 思路1(迭代法):巧妙的利用for 题解列表 2022年10月27日 0 点赞 0 评论 558 浏览 评分:9.9
C语言-自定义函数之字符串反转--直接法 摘要:解题思路:字符串的反转就是直接输出这个字符串的逆序。注意事项:1、为什么是 gets(a);因为:gets函数类似于scanf函数,用于读取标准输入,gets函数可以读入空格,而scanf函数不可以。…… 题解列表 2022年10月27日 0 点赞 0 评论 406 浏览 评分:0.0
求素数问题(超简,思路清晰C++) 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { int n,i,j; cin>>n; …… 题解列表 2022年10月27日 0 点赞 0 评论 296 浏览 评分:9.9
求矩阵的两对角线上的元素之和(思路清晰———二维数组) 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { int n,i,j,a[10][10],s=0,…… 题解列表 2022年10月27日 0 点赞 0 评论 433 浏览 评分:9.3
C语言训练-求函数值(超简C++) 摘要:解题思路:函数调用自己即可实现递归注意事项:参考代码:#include<iostream> using namespace std; int f(int x) { if(x==1) …… 题解列表 2022年10月27日 0 点赞 0 评论 415 浏览 评分:9.9
求具有abcd=(ab+cd)2性质的四位数(超简C++) 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { int i,a,b,c,d; for(…… 题解列表 2022年10月27日 0 点赞 0 评论 415 浏览 评分:9.9