随笔分类 -  codewars

摘要:题目 解决 典型的字符串处理问题,关键在于非字母(空格)的处理和大小写字母的处理 头文件中有许多常用函数 代码 #include <string> #include<cctype> std::string alphabet_position(const std::string &text) { st 阅读全文
posted @ 2025-09-01 21:36 Civilight~Eterna 阅读(6) 评论(0) 推荐(0)
摘要:题目如下 了解立方和公式即可 #include<cmath> class ASum { public: static long long findNb(long long m){ //判断m是否是完全平方数 // if(m == sqrt(m)*sqrt(m)){ // int k = m; // 阅读全文
posted @ 2025-08-28 16:07 Civilight~Eterna 阅读(3) 评论(0) 推荐(0)
摘要:include <string> #include <vector> std::string reverse_words(const std::string& str) { std::stringstream ss(str); std::vector<std::string>mp; std::str 阅读全文
posted @ 2025-08-26 16:05 Civilight~Eterna 阅读(4) 评论(0) 推荐(0)