牛客857079027号
牛客857079027号
全部文章
分类
未归档(1)
题解(60)
归档
标签
去牛客网
登录
/
注册
牛客857079027号的博客
全部文章
(共52篇)
题解 | #单词倒排#
while True: try: a=input() for i in range(len(a)): if not a[i].isalpha(): a=a.replace(a[i],' ') ...
Python3
2022-02-12
0
339
题解 | #完全数计算#
while True: try: a = int(input()) res = 0 for i in range(1,a+1): s=0 for j in range(1,i//2+1): ...
Python3
2022-02-12
0
409
分糖果
n = int(4) s = int(16)#当前拥有的糖果 f = 1 #f是需要给个人的糖果 res = [0]*n def ss(n,s,f,res): for i in range(n): if s >= f:#满足需求 ...
Python3
2021-12-22
0
298
题解 | #迷宫问题#
while True: try: m,n = map(int,input().split()) matrix = [] for i in range(m): d = list(map(int,input().split(...
Python3
2021-12-22
2
419
题解 | #求解立方根#
一开始low和high的取值考虑到a比设为(-1,1)后面分类和a比较要更简洁 a = float(input()) low = min(-1, a) high = max(1,a) ans = (low + high) / 2 e = 0.00001 while abs(ans ** 3 - a)...
Python3
2021-12-21
0
323
题解 | #矩阵乘法#
while True: try: x = int(input()) y = int(input()) z = int(input()) #m1 = [[0]*x]*y m1 = [] m2 = [...
Python3
2021-12-21
0
379
题解 | #蛇形矩阵#
while True: try: n = int(input()) res = [] for j in range(n): if j == 0:#写入第0行 for i ...
Python3
2021-12-21
0
300
题解 | #提取不重复的整数#
while True: try: a = list(input()) c = a[::-1] #c = list(map(int,d)) b = '' for i in c: if i n...
Python3
2021-12-21
0
256
题解 | #明明的随机数#
while True: try: n = int(input()) m = [] for i in range(n): #接收输入 b = int(input()) m.append(b) ...
Python3
2021-12-21
0
295
题解 | #句子逆序#
while True: try: s = input().split() #先把句子切分成单词列表 print(' '.join(s[::-1]))#逆序输出,空格分隔 except: break
Python3
2021-12-21
0
266
首页
上一页
1
2
3
4
5
6
下一页
末页