在冲浪的沸羊羊很想去广东逛gai
在冲浪的沸羊羊很想去广东逛gai
全部文章
分类
归档
标签
去牛客网
登录
/
注册
在冲浪的沸羊羊很想去广东逛gai的博客
全部文章
(共7篇)
题解 | 大整数哈希 | Python3
n=int(input()) dic={} sumnums=0 for i in range(n): a,b=map(int,input().split()) sumnums+=dic.get(a,0)*(i+1) dic[a]=b print(sumnums%(2**6...
2025-08-19
0
20
题解 | 字符串哈希 | Python
import sys dic={} n=int(input()) for _ in range(n): s=str(input()) dic[s]=dic.get(s,0)+1 print (len(dic))
2025-08-19
0
18
题解 | 【模板】队列操作 | Python
n=int(input()) nums=[] for _ in range(n): k=list(map(int,input().split())) op=k[0] if op==1: nums.append(k[1]) elif op==2: ...
2025-08-19
0
17
题解 | 列表的最值运算
#0:使用math函数 import math num=list(map(int,input().split())) print(max(num)) print(min(num)) #1:排序 nums=input().split() #sort:true大到小;false小到大--默认 nums...
2025-05-08
0
44
题解 | 查字典
d = { "a": ["apple", "abandon", "ant"], "b": ["banana", "bee", "bec...
2025-05-07
0
44
题解 | 牛牛的矩阵相加
n = int(input()) a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] for i in a: for j in range(0, 3): i[j] *= n print(a)
2025-05-07
0
51
题解 | 格式化清单
food_list = ["apple", "ice cream", "watermelon", "chips", "hotdogs", "hotpot"] while food_...
2025-05-07
0
32