牛客857079027号
牛客857079027号
全部文章
分类
未归档(1)
题解(60)
归档
标签
去牛客网
登录
/
注册
牛客857079027号的博客
全部文章
(共58篇)
题解 | #求解立方根#
一开始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
312
题解 | #提取不重复的整数#
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
题解 | #输入n个整数,输出其中最小的k个#
while True: try: a,b =map(int, input().split()) c =list(map(int, input().split())) d = sorted(c) print(' '.join(ma...
Python3
2021-12-21
0
302
题解 | #记负均正II#
#获取全部输入b try: b = [] while True: a = input() if a=='': #无输入break break b.append(a) except: pass c ...
Python3
2021-12-21
0
256
题解 | #整型数组合并#
while True: try: a = input() b = map(int,input().split()) c = input() d = map(int,input().split()) e = [] ...
Python3
2021-12-21
3
450
题解 | #二维数组操作#
注意初始化范围19,但行列号08 while True: try: a, b = map(int,input().split()) c, d, e, f = map(int, input().split()) g = int(input()) ...
Python3
2021-12-21
0
323
首页
上一页
1
2
3
4
5
6
下一页
末页