编写题解 1085: A+B for Input-Output Practice (I) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b; while(scanf("%d%d",&a,&b)==2){ printf("%d\n…… 题解列表 2023年03月09日 0 点赞 0 评论 174 浏览 评分:0.0
题目 2041: 财富之沙(C语言代码) 摘要:解题思路:贪心算法注意事项:需要把单价从大到小排序,重量也要相应地进行变换参考代码:#include<stdio.h> int main(void) { int n, m,temp,val…… 题解列表 2023年03月09日 0 点赞 0 评论 134 浏览 评分:0.0
分解质因子并保存 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;void isWanshu(int n){ int sum=0,k = 0; …… 题解列表 2023年03月09日 0 点赞 0 评论 154 浏览 评分:0.0
正确的fabonacci数列 摘要:解题思路:注意事项:fabonnaci数列是1 1 2 3 5 8 参考代码:#include<bits/stdc++.h>using namespace std;// 1 1 2 3 5 8 13/…… 题解列表 2023年03月09日 0 点赞 0 评论 183 浏览 评分:0.0
蓝桥杯2021年第十二届省赛真题-时间显示 摘要:参考代码:n=int(input())a=86400s=n//1000%ah=s//3600s=s-h*3600m=s//60s=s-m*60if(h<10 and m<10 and s<10 ): …… 题解列表 2023年03月09日 0 点赞 0 评论 146 浏览 评分:0.0
落地搞清楚,并不加上反弹的距离 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;//一球从M米高度自由下落,每次落地后返回原高度的一半,再落下。//它在第N次落地时…… 题解列表 2023年03月09日 0 点赞 0 评论 182 浏览 评分:0.0
如何寻找素数 摘要:解题思路:注意事项:!1不是素数参考代码:#include<bits/stdc++.h>using namespace std;bool isprime(int n){ if(n == 1) …… 题解列表 2023年03月09日 0 点赞 0 评论 315 浏览 评分:0.0
c语言代码+循环解决买书问题 摘要:解题思路:分别求出每种书最多能卖多少本,然后用循环代入计算注意事项:参考代码:/*小明手里有nn元钱全部用来买书,书的价格为10元,20元,50元,100元。问小明有多少种买书方案?(每种书可购买多本…… 题解列表 2023年03月09日 0 点赞 0 评论 305 浏览 评分:0.0
单个字符拼接输出 摘要:解题思路:注意事项:不要用cin<< 因为根据题目条件,字符串中可能含有空格参考代码://#include <bits/stdc++.h>#define _CRT_SECURE_NO_WARNINGS…… 题解列表 2023年03月10日 0 点赞 0 评论 146 浏览 评分:0.0
简单的冒泡排序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;void bubblesort(int *a,int n){ bool fla…… 题解列表 2023年03月10日 0 点赞 0 评论 181 浏览 评分:0.0