牛客149855094号
牛客149855094号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客149855094号的博客
全部文章
(共10篇)
题解 | #小易的升级之路#
def get_maxgys(a,b): if a<b: a,b=b,a while b: a, b = b, a%b return a while True: try: n,a=list(map(in...
2024-03-08
0
194
题解 | #放苹果#
dt={} def apple(m,n): total=0 if (m,n) in dt: return dt[m,n] elif m<0 or n <0: return 0 elif m==1 or n==1: ...
2024-03-04
0
197
题解 | #合法IP#
while True: try: s=input().split('.') l='' if len(s)==4: for a in s: if a.isdigit() and...
2024-03-02
0
163
题解 | #MP3光标位置#
代码比较 粗糙,大家能理解就好 while True: try: n=int(input()) cz=input() #初始歌曲位置 xh=1 gd=[] #歌曲清单 lst=[x...
2024-03-01
0
185
题解 | #整数与IP地址间的转换#
用format补全0的位数即可 while True: try: s1=input().split('.') s2=format(bin(int(input()))[2:],'0>32') l='' for a in s1...
2024-02-29
0
168
题解 | #记负均正#
while True: try: n=int(input()) lst=list(map(int,input().split())) fs=0 zs=0 zero=0 sum=0 ...
2024-02-28
0
153
题解 | #求最大连续bit数#
while True: try: s=bin(int(input()))[::-1] # print(s) count=[] tmp=0 for a in s: if a=='1': ...
2024-02-28
0
179
题解 | #坐标移动#
while True: try: lst=input().split(';') # print(lst) csz=[0,0] for s in lst: if len(s) in (2,3) and s[...
2024-02-25
0
141
题解 | #下厨房#
lst1 = set() while True: try: s = input().split() for a in s: lst1.add(a) except: break print(len(lst1))
2024-02-25
0
200
题解 | #字符串排序#
import sys while True: try: m=int(input()) lst1=[] for i in range(0,m): s=input() lst1.append(s[le...
2024-02-25
0
199