牛客969573159号
牛客969573159号
全部文章
题解
归档
标签
去牛客网
登录
/
注册
牛客969573159号的博客
全部文章
/ 题解
(共44篇)
题解 | #挑7#
while True: try: x1 = int(input()) n = 0 for k in range(1,x1+1): if k % 7 == 0: n = n + 1 ...
Python3
2021-10-06
0
409
题解 | #表达式求值#
str1 = '+ - * / ) ( 0 1 2 3 4 5 6 7 8 9' while True: try: #获取输入数据 x1 = input() #设置标签检测数据合法性 flag = 0 if le...
Python3
2021-10-06
4
724
题解 | #杨辉三角的变形#
while True: try: x1 = int(input()) if x1 == 1 or x1 == 2: print(-1) elif (x1+1) % 2 == 0: print(2)...
Python3
2021-10-06
23
3081
题解 | #输出单向链表中倒数第k个结点#
while True: try: N = int(input()) s = input().split() x = int(input()) print(s[-x] if x != 0 else 0) except: ...
Python3
2021-10-06
0
408
题解 | #四则运算#
str1 = '1 2 3 4 5 6 7 8 9 0 + - * / ) ( ] [ } {' x1 = input() for word in x1: if word not in str1: print('error') break else: ...
Python3
2021-10-06
0
513
题解 | #截取字符串#
while True: try: #获取输入字符 data1 = input() #获取正整数k k = int(input()) list1 = [] for i in range(k): ...
Python3
2021-10-05
1
595
题解 | #名字的漂亮度#
while True: try: #获取输入的单词数量 N = int(input()) while N: #获取输入的单词 data = input() #去重存入字典 ...
Python3
2021-10-05
15
1303
题解 | #称砝码#
while True: try: data1 = int(input()) data2 = list(map(int,input().split())) data3 = list(map(int,input().split())) ...
Python3
2021-10-05
5
522
题解 | #统计字符#
import string str1 = string.ascii_letters str2 = '1 2 3 4 5 6 7 8 9 0' while True: try: #获取输入数据 x1 = input() #设置英文字符、空格、数...
Python3
2021-10-04
0
393
题解 | #判断两个IP是否属于同一子网#
#定义函数:将一个十进制数转化为八位二进制数 def fun1(x): res = [0]*8 n = 0 while x > 0: res[-1-n] = x % 2 x = x // 2 n = n + 1 r...
Python3
2021-10-04
0
375
首页
上一页
1
2
3
4
5
下一页
末页