首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
课程
专栏·文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
在线笔面试、雇主品牌宣传
登录
/
注册
蘑菇灯
获赞
15
粉丝
0
关注
1
看过 TA
5
男
广东工业大学
2019
C++
IP属地:广东
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑蘑菇灯吗?
发布(20)
刷题
蘑菇灯
2023-05-10 23:39
C++
题解 | #句子逆序#
#include <iostream> #include <string> #include <stack> using namespace std; int main() { string str; stack<string> stack_tmp; while (cin >> str) stack_tmp.push(str); while(!stack_tmp.empty()) { cout << stack_tmp.top() << ' '; ...
0
点赞
评论
收藏
转发
蘑菇灯
2023-05-10 23:05
C++
题解 | #数字颠倒#
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string str; while (cin >> str) { reverse(str.begin(), str.end()); cout << str << endl; } } // 64 位输出请用 printf("%lld")
0
点赞
评论
收藏
转发
蘑菇灯
2023-05-09 11:06
C++
题解 | #质数因子#
#include <cmath> #include <iostream> using namespace std; int main() { int num; cin >> num; for (int i = 2; i <= sqrt(num); ++i) { while (0 == num % i) { cout << i << ' '; num /= i; } } // 只要不是1,剩下的那...
0
点赞
评论
收藏
转发
蘑菇灯
2023-05-08 12:07
C++
题解 | #坐标移动#
#include <cctype> #include <iostream> #include <istream> #include <string> #include <sstream> using namespace std; bool isNum(const string &len) { for (auto item : len) { if (!isdigit(item)) return false; } return true; } void dealA(int &x, const s...
0
点赞
评论
收藏
转发
蘑菇灯
2023-05-08 11:06
C++
题解 | #提取不重复的整数#
#include <iostream> #include <string> using namespace std; int main() { int num; cin >> num; string str = to_string(num), out = ""; str = string(str.rbegin(), str.rend()); for (auto item : str) { if (out.find(item) == out.npos) out += item; } ...
0
点赞
评论
收藏
转发
1
2
工具箱
TA的圈子
暂未加入圈子
TA的圈子
TA的笔记
暂无笔记
TA的笔记
登录
0
天
已登录
0
天
连续登录
0
人
今日访客
牛客网
牛客企业服务