KNYL
KNYL
全部文章
分类
归档
标签
去牛客网
登录
/
注册
KNYL的博客
全部文章
(共9篇)
题解 | 特殊的科学计数法
nums = list(map(int,input())) l = len(nums)-1 if nums[2]>=5: nums[1] += 1 if nums[1] >9: nums[1] %= 10 nums[0]+=1 if num...
2025-04-08
1
32
题解 | 小红的优惠券
a,b = map(int,input().split(" ")) rev = a ans = a for i in range(b): a = rev c,d = map(int,input().split(" ")) if a &g...
2025-04-08
0
28
题解 | 小红比身高
n1 = list(map(int,input().split(" "))) py = list(map(int,input().split(" "))) steps = list(map(int,input().split(" "))) ...
2025-04-07
0
42
题解 | 小红的不动点
hashd = dict() ans=0 n = int(input()) nums = list(map(int,input().split(" "))) for num in nums: if num in hashd: hashd[num]+=1 ...
2025-04-07
0
42
题解 | 讨厌鬼进货
s = list(map(int,input().split(" "))) n = s[0] cost1 = s[1] cost = 0 mark1 = list(map(int,input().split(" "))) mark2 = list(map(in...
2025-04-02
0
37
题解 | 小红的环形数组
A = list(map(int, input().split(" "))) n = A[0] o = A[1] nums = list(map(int, input().split(" "))) for i in range(o): operate ...
2025-04-02
0
52
题解 | 讨厌鬼的区间
l = list(map(int, input().split(" "))) r1 = [l[0], l[1]] r2 = [l[2], l[3]] r3 = [l[4], l[5]] def qujian(x, y): if x[1] < y[1] and x[1...
2025-04-02
0
64
题解 | 小招喵跑步
##求0到x位置我们可以反过来思考如何从x位置到0. ##注意全部代码下输入输出都要以int整数进行处理即可。 x = int(input()) step = 0 if x < 0:##翻转负数 x = abs(x) if x <= 3:##x《=3时可直接穷举得到 st...
2025-04-01
1
37
题解 | 序列找数
nums = list(map(int,input().split(" ")))#input maxnum = nums[0] l = dict()#创建哈希表 for t in range(maxnum+1):#初始化哈希表 l[t] = 0 for i,num in ...
2025-04-01
1
46