Bonou
Bonou
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Bonou的博客
全部文章
(共13篇)
题解 | k倍多重正整数集合
import sys n, k = map(int, input().split()) ls = list(map(int, input().split())) dict1 = {} for i in ls: dict1[i] = dict1.get(i,0) + 1 # print(di...
2025-08-07
0
16
题解 | 平方和
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param c int整型 # @return bool布尔型 # class Solution: def square(self , c: int) -> bool: ...
2025-07-30
0
22
题解 | 寻找丑数
import sys n = int(input()) max1 = 2**n count = 1 ls = [] set1 = {2,3,5} for i in range(n): for j in range(n): for k in range(n): ...
2025-07-30
0
15
题解 | 拼凑正方形
import sys for line in sys.stdin: a = line.split() min1 = 999999999 for i in range(4): sum = 0 for j in range(4): ...
2025-07-28
0
18
题解 | 单组_补充前导零
import sys n = int(input()) n1 = '000000000'+str(n) print(n1[-9:]) # print(f"{n:09d}") #print('{:09d}'.format(n))
2025-07-24
0
30
题解 | 游游的整数切割
import sys s = input() c = 0 for i in range(len(s)-1): if (int(s[i]) + int(s[-1])) % 2 == 0: c += 1 print(c)
2025-07-07
0
32
题解 | 字符串构造判定
from pickle import FALSE # # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param ransomNote string字符串 # @param magazine string字符串 # @return bool布尔型 #...
2025-06-27
0
25
题解 | 两个数组的交集
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param nums1 int整型一维数组 # @param nums2 int整型一维数组 # @return int整型一维数组 # class Solution: def inters...
2025-06-27
0
29
题解 | 字母异位词的长度
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param s string字符串 # @param c string字符串 # @return int整型 # class Solution: def isCongruent(self ,...
2025-06-27
0
25
题解 | 字符串哈希
import sys n = int(input()) dic = {} for i in range(n): dic[str(input().split())] = i print(len(dic))
2025-06-18
0
41
首页
上一页
1
2
下一页
末页