摘要: 1 import sys 2 m,n=list(map(int,sys.stdin.readline().strip().split())) 3 #记录横向小格边为1,竖向为-1。n=1*n,m=-1*m 4 #记录从出发点到每个节点的走法,取最大值。已知出发到下一个点最大值的走法。 5 #建立数组 阅读全文
posted @ 2023-03-14 20:34 Aneverforget 阅读(58) 评论(0) 推荐(0)
摘要: import sys n=int(sys.stdin.readline().strip()) sp=n//2 l=range(sp+2)[::-1] check=1 su=0 j=2 def chech_su(i): check=1 j=2 if i==2 or i==3: return 'su' 阅读全文
posted @ 2023-03-14 18:48 Aneverforget 阅读(19) 评论(0) 推荐(0)
摘要: import sys a=sys.stdin.readline().strip() l=[] count=-1 for i in a: count+=1 if i.isdigit(): if count==0: l.append('*') l.append(i) elif a[count-1].is 阅读全文
posted @ 2023-03-14 18:13 Aneverforget 阅读(92) 评论(0) 推荐(0)
摘要: import sys def initialize(m,n): if 0<n<10 and 0<m<10: return 0 else: return -1 def insert_line(m,up): if m<9 and 0<=up<m: return 0 else: return -1 #舍弃 阅读全文
posted @ 2023-03-14 17:03 Aneverforget 阅读(177) 评论(0) 推荐(0)
摘要: 1 import sys 2 a=sys.stdin.readline().strip() 3 def check_num(a): 4 count=0 5 for i in a: 6 if i.isdigit(): 7 count+=1 8 return count 9 10 def check_a 阅读全文
posted @ 2023-03-14 08:53 Aneverforget 阅读(133) 评论(0) 推荐(0)