柚茶_Rola
柚茶_Rola
全部文章
分类
归档
标签
去牛客网
登录
/
注册
柚茶_Rola的博客
全部文章
(共451篇)
题解 | #24点游戏算法#
def f(nums, tar): if len(nums) == 1: return nums[0] == tar for i in range(len(nums)): t = nums[i] c = nums[:i] + nums[...
2024-10-31
0
53
题解 | #配置文件恢复#
# 2024年10月31日 周四 上午10:31 ke = [ "reset", "reset board", "board add", "board delete", &...
2024-10-31
0
37
题解 | #查找两个字符串a,b中的最长公共子串#
s1 = input().lower() s2 = input().lower() p = 0 if len(s1) > len(s2): s1, s2 = s2, s1 s = '' for i in range(len(s1)): for j in range(i, l...
2024-10-31
0
43
题解 | #查找两个字符串a,b中的最长公共子串#
s1 = input().lower() s2 = input().lower() p = 0 if len(s1) > len(s2): s1, s2 = s2, s1 lst = [] for i in range(len(s1)): for j in range(i,...
2024-10-31
0
39
题解 | #公共子串计算#
s1 = input().lower() s2 = input().lower() p = 0 if len(s1) > len(s2): s1, s2 = s2, s1 for i in range(len(s1)): for j in range(i, len(s1))...
2024-10-31
0
28
题解 | #MP3光标位置#
n = int(input()) # 歌曲总数,10 c = input() # UUUU song = [] for i in range(1, n + 1): song.append(i) p = 1 # 光标的位置,p=[1,2,3,4],起始是第一首歌的位置 f = 1 #...
2024-10-31
0
26
题解 | #DNA序列#
s = input() N = int(input()) ls = [] for i in range(0, len(s)): ls.append(s[i : i + N]) #print(ls) lst = [] for i in ls: if len(i) == N: ...
2024-10-31
0
42
题解 | #找出字符串中第一个只出现一次的字符#
s = input() for i in s: if s.count(i) == 1: print(i) break else: print(-1)
2024-10-31
0
25
题解 | #找出字符串中第一个只出现一次的字符#
s = input() for i in s: if s.count(i) == 1: print(i) break else: print(-1)
2024-10-31
0
46
题解 | #高精度整数加法#
s1 = input() s2 = input() print(int(s1)+int(s2))
2024-10-31
0
24
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页