题解列表
题目 1022: [编程入门]筛选N以内的素数
摘要:解法:线性筛
时间复杂度:$$O(n)$$
```cpp
#include
using namespace std;
int n, prime[1005], st[1005], k = 0;……
动态数组指针C语言题解
摘要:解题思路:注意事项:参考代码:#include<malloc.h>typedef struct student{ char num[100]; char name[100]; int……
未知定理的情况下,通过简单列出2个数依照题意拆分寻找出规律
摘要:解题思路:在未知定理的情况下依照题目,可以先行求出该连续奇数中的中间值即pow(m,2),通过比较第一个奇数与中间值,最后一个奇数与中间值的大小发现规律如当m=13时,pow(m,2)=169,pow……
数组的距离-Python
摘要:解题思路: 没有技巧,直接全部算出来取最小哈哈,说下代码思路 以a1 a2 a3 a4 a5 b1 b2 b3 b4 b5 为例(ai, bi, i=1,2,3,4,5) ……
编写题解 1098: 陶陶摘苹果(c语言 看题解都比较麻烦,写一个基础简单的)
摘要:解题思路:正常的数组的输入与输出注意事项:不要被题目中的30厘米迷惑了,直接加上去就行参考代码:#include<stdio.h>
int main(){
int a[10],i,n,c……
二级C语言-分段函数
摘要:参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){ double x; cin>>x; i……
二级C语言-计负均正
摘要:```cpp
#include
#include
using namespace std;
int main()
{
int a[21],as=0,bs=0,bss=0;
……
[编程入门]结构体之成绩统计2 新手简单易懂版本
摘要:```cpp
#include
#include
using namespace std;
struct Student
{
string xuehao;
string xingmi……