题解列表

筛选

自定义函数处理素数-C语言

摘要:解题思路:首先注意1既不是素数也不是偶数,所以i从2开始计数;遍历在2~n之间是否存在i值能被n整除,如存在则n为非素数;注意事项:找到一个能被n整除的i后即刻用break跳出for循环,不然会打印n……

蓝桥杯算法提高VIP-插入排序

摘要:解题思路:  这题有问题注意事项:参考代码:#include<iostream> #include<cstdio> using namespace std; long long sum[200]……

1196: 去掉空格

摘要:关键是运用find()函数和erase()函数。#include<bits/stdc++.h> using namespace std;   int main(){     vector<in……

1130: C语言训练-数字母

摘要:此题关键是使用isalpha()函数,注意读数据使用getline()。(尽管使用cin也能过)#include<bits/stdc++.h> using namespace std; int m……