光亮Hikaryou
光亮Hikaryou
全部文章
题解
归档
标签
去牛客网
登录
/
注册
光亮Hikaryou的博客
全部文章
/ 题解
(共10篇)
题解 | #迷宫问题#
while 1: try: n,m = [int(i) for i in input().split()] maze = [] maze.append([1]*(m+1)) for i in range(n): ...
Python3
2021-11-01
3
595
题解 | #从单向链表中删除指定值的节点#
while 1: try: s = input().split() n = s[0] head = s[1] out = s[-1] info = s[2:-1] node = [] ...
Python3
2021-10-10
0
472
题解 | #24点游戏算法#
import itertools as it while 1: try: a,b,c,d = [int(x) for x in input().split(" ")] flag = False ls = [a,b,c,d] te...
Python3
2021-10-09
12
1208
题解 | #查找兄弟单词#
import itertools as it while True: try: ls = input().split(" ") n = int(ls[0]) s = [] for i in range(n): ...
Python3
2021-10-09
0
373
题解 | #整型数组合并#
while 1: try: input() x = [int(x) for x in input().split()] input() x = x+[int(x) for x in input().split()] ...
Python3
2021-09-30
0
526
题解 | #成绩排序# Python sort list
while 1: try: n = int(input()) if input() == "0": flag = True else: flag = False ...
Python3
2021-09-29
36
4264
题解 | #走方格的方案数#Combination nCr n选r Combination
画了一下图找到规律就是nCr种走法,跟排列组合是一样的 import math as m while 1: try: a,b = [int(x) for x in input().split()] n = a+b r = a ...
Python3
2021-09-29
1
626
题解 | #数据分类处理#
while 1: try: #input info = input().split() info = info[1:] #fist detele rule = [int(x) for x in input().split()] ...
Python3
2021-09-28
0
641
题解 | #计算日期到天数转换#
while 1: try: y,***p(int,input().split()) #print(y) if y%400 == 0 or (y%100!=0 and y%4 ==0): run = True ...
Python3
2021-09-28
0
432
题解 | #配置文件恢复# Python简单好理解字符串长度截取判断方法
while 1: try: s = input().split(" ") ############################### reset if len(s) == 1 and s[0] != " "*len(...
Python3
字符串
2021-09-27
2
574