题解列表

筛选

1145: C语言训练-自由落体问题

摘要:解题思路:使用循环第一次单独算!后面每次算两个!注意事项:参考代码:#include<iostream> #include<iomanip> using namespace std; int m……

1139: C语言训练-求素数问题

摘要:解题思路:一一枚举,再判断是否是质数。注意事项:注意有用#include<cmath>!!!参考代码:#include<iostream> #include<cmath> using namesp……

计算2的n次方

摘要:解题思路:只是随手一做,有很多不好的地方,请谅解注意事项:注意时间复杂度参考代码:#include<stdio.h>#include<iostream>using namespace std;int ……

关于数字的处理与判断

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){   string n;    cin >> n;    in……

P1002(C++)结构体,自定义排序

摘要:解题思路:定义结构体+结合sort排序+自定义类型排序注意事项:两个获得奖金一致时,按输入顺序输出先输入的参考代码:#include <iostream>#include <algorithm>usi……

P1001C++排序+素数

摘要:解题思路:就一个排序(直接使用sort即可)和判定素数注意事项:参考代码:#include <iostream>#include <string>#include <algorithm>using n……

自定义函数之数字分离

摘要:解题思路:定义一个函数分解并输出即可。注意事项:注意分解方法。参考代码:#include<bits/stdc++.h> using namespace std; void print(int n)……