[竞赛入门]简单的a+b(C++) 摘要:解题思路:定义a,b,输入各值,输出a+b就可以了注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b; …… 题解列表 2024年07月29日 0 点赞 0 评论 238 浏览 评分:0.0
太经典了,链表的经典操作 链表数据求和操作 摘要:解题思路:还是前面讲的链表的经典操作注意事项:链表的使用,注意删除节点参考代码:#includeusing namespace std; typedef struct ListPlural{ …… 题解列表 2024年07月29日 0 点赞 0 评论 139 浏览 评分:0.0
递归和迭代求解斐波那契数列 摘要:递归:#include <stdio.h> int Input() { int N; scanf("%d", &N); return N; } int Fib…… 题解列表 2024年07月29日 0 点赞 0 评论 165 浏览 评分:0.0
set集合的使用(插入与遍历) 摘要:#include<bits/stdc++.h> using namespace std; int main() { int n,m; while(cin>>n>>m) { ve…… 题解列表 2024年07月29日 0 点赞 0 评论 107 浏览 评分: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 评论 110 浏览 评分: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 评论 261 浏览 评分:0.0
题解 2808: 买房子 摘要:解题思路:注意事项:参考代码:# 输入年薪N和房价增长率K n, k = map(int, input().strip().split()) # 初始化变量 a = n # 程序员积攒的总…… 题解列表 2024年07月30日 0 点赞 0 评论 223 浏览 评分: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 评论 405 浏览 评分: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 评论 388 浏览 评分:0.0