牛客255581536号
牛客255581536号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客255581536号的博客
全部文章
(共54篇)
题解 | #等差数列#
#include <iostream> using namespace std; //求前n项和 int sum(const int n) { //递归出口 if (n == 1) return 2; //前(n-1)项+第n项 retu...
2024-01-04
0
246
题解 | #自守数#
#include <iostream> using namespace std; //求自然数的位数 int digit(const int n) { //如果是0,返回1 if (n <= 0) return 1; //如果是个位数,返回...
2024-01-03
0
334
题解 | #记负均正#
#include <iostream> #include <iomanip> using namespace std; void stats(const int n) { int negamount = 0;//负数个数 //为避免得到整数,将累加器设为浮点...
2024-01-02
0
240
题解 | #表示数字#
#include <iostream> #include <string> using namespace std; //判断是否是数字 bool isnum(const char ch) { if (('0' <= ch) && (ch &l...
2024-01-01
0
206
题解 | #记票统计#
#include <iostream> #include <list> #include <string> using namespace std; void test(const int n) { //用于记录每人票数 list<pair...
2024-01-01
0
205
题解 | #走方格的方案数#
#include <iostream> using namespace std; //统计走m*n方格的方案数 int scheme(const int m, const int n) { //m=0说明只需要从左走到右,只有一种方案 if (m == 0) ...
2023-12-31
0
225
题解 | #密码强度等级#
#include <iostream> #include <string> using namespace std; //密码长度 int len(const string s) { if (s.length() <= 4) return 5;...
2023-12-29
0
230
题解 | #求最大连续bit数#
#include <iostream> using namespace std; //统计最大连续bit数 int count(const int n) { //用于计数 int c = 0; //用于存储结果 int result = 0; /...
2023-12-28
0
227
题解 | #放苹果#
#include <iostream> using namespace std; //统计m个相同的苹果放入n个相同的盘子中有多少种放法,其中o为每个盘子可放的最多苹果个数 int counts(const int m, const int n, const int o) { ...
2023-12-24
0
244
题解 | #字符串字符匹配#
#include <iostream> #include <string> using namespace std; int main() { string a, b; while (cin >> a >> b) { ...
2023-07-19
0
176
首页
上一页
1
2
3
4
5
6
下一页
末页