set集合的使用(插入与遍历) 摘要:#include<bits/stdc++.h> using namespace std; int main() { int n,m; while(cin>>n>>m) { ve…… 题解列表 2024年07月29日 0 点赞 0 评论 109 浏览 评分:0.0
2968: 区间内的真素数 摘要:```cpp #include using namespace std; int ss(int a){ if(ax>>y; for(int i=x;i…… 题解列表 2024年07月29日 0 点赞 0 评论 111 浏览 评分:0.0
2981: 二进制分类 摘要:```cpp #include using namespace std; int A,B; bool turn(int x) { int a=0,b=0; while(x!=0) …… 题解列表 2024年07月29日 0 点赞 0 评论 96 浏览 评分:0.0
题解 2807:计算金额(for) 摘要:解题思路:注意事项:参考代码:a,b,c=map(int,input().strip().split())for i in range(c): b *= (1+a/100)print(int(b…… 题解列表 2024年07月29日 0 点赞 0 评论 262 浏览 评分:0.0
题解 2808: 买房子 摘要:解题思路:注意事项:参考代码:# 输入年薪N和房价增长率K n, k = map(int, input().strip().split()) # 初始化变量 a = n # 程序员积攒的总…… 题解列表 2024年07月30日 0 点赞 0 评论 225 浏览 评分:0.0
球弹跳高度的计算 摘要:解题思路:注意事项:参考代码:h = float(input())s = hfor i in range(9): h = h/2 s += h*2print(f"{s:g}")print(…… 题解列表 2024年07月30日 0 点赞 0 评论 407 浏览 评分:0.0
C语言训练-角谷猜想 摘要:解题思路:注意事项:参考代码:n = int(input())while n != 1: if n%2 == 0: print(f"{int(n)}/2={int(n/2)}") …… 题解列表 2024年07月30日 0 点赞 0 评论 389 浏览 评分:0.0
编程入门]有规律的数列求和(c语言实现) 摘要:解题思路:首先我们去发现题目数列规律,第一项分子为2,第二项分子为3,第三项为5,第四项为8,第n项就为(n-)+(n-2);分母同样的规律,不过第1和第二项为1和2,第n项也是(n-1)+(n-2)…… 题解列表 2024年07月30日 0 点赞 0 评论 239 浏览 评分:0.0
优质题解,有解析 摘要:解题思路:为了解决这个问题,我们需要构建一个图,其中节点是点,边是两点之间的连线,边的权重是两点之间的直线距离。由于我们需要找到从源点到目标点的最短路径,我们可以使用Dijkstra算法(适用于有权图…… 题解列表 2024年07月30日 0 点赞 0 评论 188 浏览 评分:0.0
简简单单,,,,,有一个函数如下,写一程序,输入x,输出y值。 摘要:解题思路:没啥难度,怎么想怎么做注意事项:两位小数参考代码:#include<iostream> #include <iomanip> using namespace std; int main…… 题解列表 2024年07月30日 0 点赞 0 评论 241 浏览 评分:0.0