题解列表

筛选

二级C语言-自定义函数

摘要:解题思路: 采用递归求解注意事项: 包含#include<iomanip>以保证输出4位小数;参考代码:#include<iostream> using namespace std; #inclu……

IP判断 简单易懂(C语言代码)

摘要:```c #include #include #include #define lenth 256 // 检查给定的字符串是否为有效的IPv4地址 // 参数s: 表示IPv4地址的字符串……

质因数分解

摘要:解题思路:注意事项:参考代码n=int(input())f=2while f*f<=n:    if n %f==0:        print(n//f)    f+=1……

计算素数和(用C++)

摘要:参考代码:#include<iostream> using namespace std; bool isprime(int x) { int count = 0; for (int i ……

2^k进制数:组合数

摘要:解题思路:组合数注意事项:参考代码:#include<iostream> #include<cmath> using namespace std; long long c(int n, int ……

简明易懂的c语言解法,其他语言也可以借鉴

摘要:解题思路:如果b是a的因数和,我们再去检验b的因数和是不是a,所以对于每个a,先让b=a的因数和,就可以大大减少计算注意事项:这道题要通过思考a、b关系简化运算,不然容易超时参考代码:#include……

dfs+判断数组解决排列

摘要:解题思路:注意事项:坑:1.题目空了一格输出,输出一个就换行2.字典序输出参考代码:#include<bits/stdc++.h>const int N=10;//题目默认字典序了strcmpint ……