梁小秋
梁小秋
全部文章
题解
归档
标签
去牛客网
登录
/
注册
梁小秋的博客
全部文章
/ 题解
(共4篇)
HJ1 字符串最后一个单词的长度 | 杂乱无章的初级程序员的题解
使用字符串查找函数 [string.find] #include <iostream> #include <string> using namespace std; int main() { string s; getline(cin, s); /...
C++
字符串
2021-03-19
38
6455
[编程题]字符个数统计 noskipws + set
#include <iostream> #include <set> using namespace std; int main() { set<char> s; char c; cin >> noskipws; w...
2020-05-01
4
1017
HJ2 计算某字符出现次数
使用 count_if 求解 #include <algorithm> #include <iostream> #include <string> using namespace std; int main() { string s; getl...
C++
2020-04-26
143
14712
HJ6 质数因子 | 杂乱无章的初级程序员的题解
减而治之 递推 #include <iostream> #include <cmath> using namespace std; int main() { uint32_t n; cin >> n; for (uint32_t i ...
C++
2019-09-04
4
2703