1004: [递归]母牛的故事 摘要:解题思路:其实本质上都是数学问题,我们可以从最简单的观察入手。从第一年第十年,所得牛数依次是1,2,3,4,6,9,13,19,28,41我们可以观察到规律,从第四年起,答案符合f[n]=f[n-1]…… 题解列表 2022年01月01日 0 点赞 0 评论 631 浏览 评分:9.9
1203: 多输入输出练习2 摘要:#include <bits/stdc++.h> using namespace std; int main(){ const double PI = 3.1415;//PI要取到四…… 题解列表 2022年01月01日 0 点赞 0 评论 507 浏览 评分:0.0
1202: 多输入输出练习1 摘要:#include <bits/stdc++.h> using namespace std; //以空格为分隔符分割字符串 vector<int> split(const string &s,…… 题解列表 2022年01月01日 0 点赞 0 评论 348 浏览 评分:0.0
1200: 回文串 摘要:回文串判断,直接 equal 函数往上拍。#include <bits/stdc++.h> using namespace std; int main(){ string s; …… 题解列表 2022年01月01日 0 点赞 0 评论 379 浏览 评分:0.0
1123: C语言训练-列出最简真分数序列* 摘要:#include <bits/stdc++.h> using namespace std; bool Judge(int &a,int &b){ for(int i=2;i<=a;i…… 题解列表 2022年01月01日 0 点赞 0 评论 353 浏览 评分:0.0
1121: C语言训练-8除不尽的数 摘要:暴力法解决,循环的事情就交给计算机来做吧。#include <bits/stdc++.h> using namespace std; int main(){ for(int i=0;…… 题解列表 2022年01月01日 0 点赞 0 评论 510 浏览 评分:0.0
1978: 分类计算 摘要:解题思路:注意事项:参考代码:a,b = map(int,input().split()) if a**2+b**2>100: print(a**2+b**2) else: p…… 题解列表 2022年01月01日 0 点赞 0 评论 511 浏览 评分:0.0
1095: The 3n + 1 problem 摘要:从 a 到 b 挨个判断跌落到 1 需要的次数,保存最大的次数。注意 a 大于 b 的情形。#include <bits/stdc++.h> using namespace std; int …… 题解列表 2022年01月01日 0 点赞 0 评论 301 浏览 评分:0.0
建议新手观看 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>/* run this program using the console pauser or …… 题解列表 2022年01月01日 0 点赞 0 评论 407 浏览 评分:0.0
【C语言题解】三个数的最大值 摘要:解题思路:利用变量max更新最大值,如果a大于max,那么max赋值为a,如果b大于max,max赋值为b。。。。。注意事项: ·第一种情况:如果题目要求输入的三个数a,b,c都大于0,…… 题解列表 2022年01月01日 0 点赞 0 评论 875 浏览 评分:9.9