2861: 验证子串 摘要:解题思路:注意事项:谁看得出来下面的数据有什么区别?测试数据:1.abcdddncabca2.abc dddncabca参考代码:s1 = "".join(input().split()) s2 =…… 题解列表 2024年03月25日 0 点赞 1 评论 843 浏览 评分:0.0
2665: 蓝桥杯2022年-选数异或(异或性质+动态规划) ```cpp#include#includeusingnamespacestd;typedeflonglongLL;constintN=1e5+10;/*注意到x是提前给出的,所以可以考虑预处理异或的性质:a^b=x则a^x=b则已知a和x时, 题解列表 2024年03月25日 0 点赞 0 评论 919 浏览 评分:0.0
2863: 删除单词后缀 摘要:解题思路:注意事项:参考代码:s = input() if 'er' in s[-2:] or 'ly' in s[-2:]: print(s[0:-2])…… 题解列表 2024年03月25日 0 点赞 0 评论 690 浏览 评分:0.0
2864: 单词替换 摘要:解题思路:注意事项:参考代码:s = input().strip().split() s1 = input().strip() s2 = input().strip() a = [s2 if i…… 题解列表 2024年03月25日 0 点赞 1 评论 443 浏览 评分:0.0
2866: 过滤多余的空格 解题思路:注意事项:参考代码:print("".join(input().split())) 题解列表 2024年03月25日 0 点赞 0 评论 731 浏览 评分:0.0
C语言:switch语句 摘要:解题思路: 直接利用switch语句来实现注意事项:参考代码:#include<stdio.h>int main(){ int a,d; scanf("%d",&a); switch…… 题解列表 2024年03月25日 0 点赞 0 评论 514 浏览 评分:0.0
小白随便写的,记录一下 ```pythondefpartition(li):key=li[0]new_li=[]#从左找比key小的foriinli[::-1]:ifi=key:new_li.append(i)#输出列表内容foriinn 题解列表 2024年03月25日 0 点赞 0 评论 778 浏览 评分:0.0
2865: 紧急措施 摘要:解题思路:注意事项:strip有神奇的魔力参考代码:email = input().strip() N = int(input()) arr = [] for i in range(N): …… 题解列表 2024年03月25日 0 点赞 0 评论 1116 浏览 评分:0.0
2867: 单词的长度 摘要:解题思路:注意事项:参考代码:s = input().split() s1 = [] for i in s: s1.append(len(i)) print(",".join(map(…… 题解列表 2024年03月25日 0 点赞 0 评论 686 浏览 评分:0.0
小白随便写的,记录一下 ```pythondefsort_time(t_list):n=len(t_list)#传入一个时间列表foriinrange(n):t_list[i]=t_list[i].split('/')#桶排思想先排日期再排月份最后年份t_list.sort(key=lambdax:x[1])t_list.s 题解列表 2024年03月25日 0 点赞 0 评论 813 浏览 评分:0.0