题目描述 有一字符串,包含n个字符。自定义函数之字符串拷贝 C语言 摘要:解题思路:注意事项:写一函数,将此字符串中从第m个字符开始的全部字符复制成为另一个字符串。 输入格式 数字n 一行字符串 数字m 输出格式 从m开始的子串 样例输入 6 abcdef 3 样例输出 c…… 题解列表 2024年01月06日 0 点赞 0 评论 251 浏览 评分:0.0
石头剪刀布 摘要:解题思路:注意事项:参考代码:def winner(n,pattern_A,pattern_B): a=pattern_A*(n//len(pattern_A))+pattern_A[:n%le…… 题解列表 2024年01月06日 0 点赞 0 评论 252 浏览 评分:0.0
信息学奥赛一本通T1181-整数奇偶排序(C++_STL) 摘要:参考代码:#include <iostream> #include <algorithm> #include <vector> using namespace std; bool cmp(…… 题解列表 2024年01月06日 0 点赞 0 评论 221 浏览 评分:0.0
编写题解 2791: 计算邮资 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int a; char c; cin>>…… 题解列表 2024年01月06日 0 点赞 0 评论 202 浏览 评分:0.0
编写题解 1480: 模拟计算器 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int a,b; char c; cin…… 题解列表 2024年01月06日 0 点赞 0 评论 172 浏览 评分:0.0
编写题解 1783: 星期判断机 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int a; cin>>a; switc…… 题解列表 2024年01月06日 0 点赞 0 评论 240 浏览 评分:0.0
不吉利日期 摘要:``` #include #include #include #include using namespace std; typedef long long ll; const i…… 题解列表 2024年01月06日 0 点赞 0 评论 238 浏览 评分:0.0
不重复地输出数(很好体现了计数排序的优势) 摘要:解题思路: 实现去除重复元素并排序,正好对应上了计数排序的功能, 计数排序: (1)找出待排序的数组中最大和最小的元素 (2)统计数组中每个值为i的元素出现的次数,存入数组C的第i项 我…… 题解列表 2024年01月06日 0 点赞 0 评论 310 浏览 评分:0.0
素数回文数的个数两种方法 摘要:暴力写法,范围只有1000我们只需要前后就好了 ``` #include #include #include #include using namespace std; typed…… 题解列表 2024年01月06日 0 点赞 0 评论 228 浏览 评分:0.0
一段一段来判断长度 摘要:``` #include #include #include #include using namespace std; int main() { string s,c;…… 题解列表 2024年01月06日 0 点赞 0 评论 248 浏览 评分:0.0