利用最大公约数为1解决 摘要:解题思路:只需考虑分子i,从1到39依次检索,要使其为最简真分数,只要(i , 40)= 1 ,想必大家已经写过最大公约数的函数了,利用欧几里得算法即可注意事项:https://blog.dotcp…… 题解列表 2023年10月23日 0 点赞 0 评论 393 浏览 评分:9.9
提醒几个坑点 摘要:注意事项:①第一行输出位数,记得加换行符。②第二行最后的数字后面没有空格,也就是说不能循环“%d+空格“输出。输出最后一个数字以后记得加换行符。③第三行一位一位倒序输出读入的数字,并不是算出倒序后的整…… 题解列表 2023年10月23日 0 点赞 0 评论 448 浏览 评分:0.0
c++最简单方法—递归 摘要:解题思路:每次刷新需要判断回文的数,进入下次递归进行判断注意事项:输出一次res就要给他重新刷新为0参考代码:#include<iostream>using namespace std;int re…… 题解列表 2023年10月23日 0 点赞 0 评论 876 浏览 评分:0.0
c++算法(保留小数位要注意) 摘要:解题思路:# include<iostream> # include<iomanip> using namespace std; int main(){ double a,b,…… 题解列表 2023年10月23日 1 点赞 0 评论 323 浏览 评分:0.0
石头剪刀布 摘要:解题思路:注意事项:参考代码:ls=["Rock", "Scissors", "Paper"]a=b=0x=0f=[]N = int(input())for i in range(N): a,b = …… 题解列表 2023年10月23日 0 点赞 0 评论 604 浏览 评分:9.9
懂得都懂,不懂的我也没办法 摘要:from collections import defaultdict def num_dc(A): res = 0 n = N dp = [defaultdict(i…… 题解列表 2023年10月23日 0 点赞 0 评论 442 浏览 评分:9.9
编写题解 1670: 拆分位数(c++) 摘要:解题思路:利用数组来进行倒序输出注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a[3]; int n; cin >> …… 题解列表 2023年10月23日 0 点赞 0 评论 464 浏览 评分:9.9
题解(c++):1018: [编程入门]有规律的数列求和 摘要:解题思路:首先观察数列,然后找后一个分子分母与前一个分子分母之间的规律注意事项:保留两位小数参考代码:#include<iostream>#include<iomanip>using namespac…… 题解列表 2023年10月23日 0 点赞 0 评论 404 浏览 评分:9.9
2017: 猜价模拟 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { long int n; cin>>n;…… 题解列表 2023年10月23日 0 点赞 0 评论 402 浏览 评分:0.0
等差数列简单求解 摘要:参考代码:#include<stdio.h>int main(){ int n, i; scanf("%d", &n); int arr[n];//定义一个数组名 arr[0]…… 题解列表 2023年10月23日 0 点赞 0 评论 362 浏览 评分:0.0