1250: 素数回文 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h> using namespace std; bool sushu(int &n){//判断素数 if(n…… 题解列表 2022年01月01日 0 点赞 0 评论 703 浏览 评分:0.0
2630: 又一个送分题 摘要:#include <bits/stdc++.h> using namespace std; int main(){ int n,a; cin >> n; doub…… 题解列表 2022年01月01日 0 点赞 0 评论 625 浏览 评分:0.0
1730: 剩下的树-C语言 ```c//剩下的树#include#include#definemax10000intmain(){intL,M,A[max],a,b,sum;while(scanf("%d%d",&L,&M)!=EOF&&(L!=0||M!=0)){sum=0;for(inti=0;i 题解列表 2022年01月02日 0 点赞 0 评论 761 浏览 评分:0.0
最小公倍数 最大公约数 摘要:解题思路:无注意事项:无参考代码:#include <iostream>using namespace std;int func(int a, int b){ return a % b == 0 ? …… 题解列表 2022年01月02日 0 点赞 0 评论 715 浏览 评分:0.0
1985: 分段计算 摘要:#include<bits/stdc++.h> using namespace std; int main(){ int x; cin >> x; if(x<3)…… 题解列表 2022年01月02日 0 点赞 0 评论 621 浏览 评分:0.0
1981: 输出M到N的数 摘要:无脑打印。#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin >> a >> b; …… 题解列表 2022年01月02日 0 点赞 0 评论 525 浏览 评分:0.0
2246: 蓝桥杯算法训练-字符串合并 摘要:两字符串直接相加。#include<bits/stdc++.h> using namespace std; int main(){ string a,b; getline(…… 题解列表 2022年01月02日 0 点赞 0 评论 644 浏览 评分:0.0
2213: 蓝桥杯算法训练-送分啦 摘要:无脑打印。#include<iostream> using namespace std; int main() { cout << "yes" << endl; return…… 题解列表 2022年01月02日 0 点赞 0 评论 684 浏览 评分:0.0
宏定义之找最大数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define MAX(a,b,c) (a>b?a:b)>c?(a>b?a:b):cfloat zuida(float a,float …… 题解列表 2022年01月02日 0 点赞 0 评论 517 浏览 评分:0.0
2225: 蓝桥杯算法训练-出现次数最多的整数 用pair保存数字本身和出现的次数,由于输入数据是有序的,所以只需要判断vector最后一个元素的first是不是与读进来的数字相等就可以进行接下来的压入向量和次数增加操作了。#includeusingnamespacestd;intmain(){intn, 题解列表 2022年01月02日 0 点赞 0 评论 822 浏览 评分:0.0