bb凯
bb凯
全部文章
分类
归档
标签
去牛客网
登录
/
注册
bb凯的博客
全部文章
(共35篇)
题解 | 田忌赛马
import sys v = list(map(int, input().split())) a = list(map(int, input().split())) v1 = sorted(v) a1 = sorted(a) if max(a1) > v1[1] and a[1] > ...
2025-12-01
0
7
题解 | 铺地毯
import sys n = int(input()) a = [tuple(map(int, input().split())) for i in range(n)] x,y = map(int, input().split()) t = -1 for j in range(n): if ...
2025-11-30
0
10
题解 | 链表序列化
# class ListNode: # def __init__(self, x): # self.val = x # self.next = None # # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @para...
2025-11-29
0
8
题解 | 数颜色
import sys s = list(input()) x = "R" y = "G" z = "B" count1 = 0 count2 = 0 count3 = 0 for i in s: if i == x: ...
2025-11-26
0
12
题解 | 牛牛逆序输出
n = input() a = list(n) b = a[::-1] c = "".join(b) d = int(c) print(d)
2025-11-23
0
12
题解 | 牛牛的替换
n = list(input().split()) a = list(input()) for i in range(int(n[0])): if a[i] == n[1]: a[i] = n[2] if a[i] == n[3]: a...
2025-11-23
0
15
题解 | 清楚姐姐的糖葫芦
s = list(input()) count = 0 for i in s: if i == "o": count += 1 print(count)
2025-11-23
0
13
题解 | 有序序列合并
n,m = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) for i in b: a.append(i) a = sorted(a) for ...
2025-11-23
1
13
题解 | 神秘石像的镜像序列
a = list(map(int, input().split())) b = a[:-1] c = reversed(b) for i in c: print(i, end = " ")
2025-11-23
1
10
题解 | 奇偶统计
n = int(input()) count1 = 0 count2 = 0 for i in range(1, n + 1): if i % 2 == 0: count2 += 1 elif i % 2 != 0: count1 += 1 print...
2025-11-23
1
13
首页
上一页
1
2
3
4
下一页
末页