2865: 紧急措施 摘要:解题思路:注意事项:strip有神奇的魔力参考代码:email = input().strip() N = int(input()) arr = [] for i in range(N): …… 题解列表 2024年03月25日 0 点赞 0 评论 1085 浏览 评分:0.0
小白随便写的,记录一下 ```pythondefpartition(li):key=li[0]new_li=[]#从左找比key小的foriinli[::-1]:ifi=key:new_li.append(i)#输出列表内容foriinn 题解列表 2024年03月25日 0 点赞 0 评论 745 浏览 评分:0.0
C语言:switch语句 摘要:解题思路: 直接利用switch语句来实现注意事项:参考代码:#include<stdio.h>int main(){ int a,d; scanf("%d",&a); switch…… 题解列表 2024年03月25日 0 点赞 0 评论 492 浏览 评分:0.0
2866: 过滤多余的空格 解题思路:注意事项:参考代码:print("".join(input().split())) 题解列表 2024年03月25日 0 点赞 0 评论 710 浏览 评分:0.0
2864: 单词替换 摘要:解题思路:注意事项:参考代码:s = input().strip().split() s1 = input().strip() s2 = input().strip() a = [s2 if i…… 题解列表 2024年03月25日 0 点赞 1 评论 425 浏览 评分:0.0
2863: 删除单词后缀 摘要:解题思路:注意事项:参考代码:s = input() if 'er' in s[-2:] or 'ly' in s[-2:]: print(s[0:-2])…… 题解列表 2024年03月25日 0 点赞 0 评论 663 浏览 评分: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 评论 884 浏览 评分:0.0
2862: 字符串移位包含问题 摘要:解题思路:注意事项:自己看下面的数据测试数据:1.AABCD CDAA2.AABCDCDAA参考代码:s = input().split() if len(s) == 2: count =…… 题解列表 2024年03月25日 0 点赞 3 评论 488 浏览 评分:9.9
2861: 验证子串 摘要:解题思路:注意事项:谁看得出来下面的数据有什么区别?测试数据:1.abcdddncabca2.abc dddncabca参考代码:s1 = "".join(input().split()) s2 =…… 题解列表 2024年03月25日 0 点赞 1 评论 817 浏览 评分:0.0
2860: 字符串判等 摘要:解题思路:注意事项:参考代码:s1 = "".join(input().lower().split()) s2 = "".join(input().lower().split()) if s1 =…… 题解列表 2024年03月25日 0 点赞 0 评论 595 浏览 评分:9.9