摘要: list_num = input().split() list_num.sort() print("->".join(list_num[::-1])) 阅读全文
posted @ 2020-06-21 19:49 tf383838 阅读(110) 评论(0) 推荐(0) 编辑
摘要: s=input() s1='' for i in range(len(s)-1): s1+=s[i] lt=s1.split() ln=list() for i in lt: ln.append(len(i)) m=0 for i in range(len(ln)): if ln[i] > ln[m 阅读全文
posted @ 2020-06-21 16:41 tf383838 阅读(99) 评论(0) 推荐(0) 编辑
摘要: n=int(input()) list1=list(map(eval,input().split())) list2=list(map(eval,input().split())) list3_b=[] list3_g=[] for i in range(n): if list2[i]==1: li 阅读全文
posted @ 2020-06-21 16:40 tf383838 阅读(143) 评论(0) 推荐(0) 编辑
摘要: n = int(input()) ans = 0 for i in range(1, n+1): t = i ok = False while t > 0: g = t % 10 if g == 2 or g == 0 or g == 1 or g == 9: ok = True t = t // 阅读全文
posted @ 2020-06-21 16:38 tf383838 阅读(62) 评论(0) 推荐(0) 编辑
摘要: print(input()[-1]) 阅读全文
posted @ 2020-06-21 16:37 tf383838 阅读(26) 评论(0) 推荐(0) 编辑
摘要: n=int(input()) def fib(n): if n == 1: return [1] if n == 2: return [1, 1] fibs = [1, 1] for i in range(2, n): fibs.append(fibs[-1] + fibs[-2]) return 阅读全文
posted @ 2020-06-21 16:35 tf383838 阅读(209) 评论(0) 推荐(0) 编辑
摘要: n = int(input()) num = 1 a = [ [0]*n for i in range(n)] begy = int(n/2) if n%2 == 0: begx = begy-1 else: begx = begy a[begx][begy] = num def luxian(i) 阅读全文
posted @ 2020-06-21 16:34 tf383838 阅读(52) 评论(0) 推荐(0) 编辑
摘要: def word_len(s): return len([i for i in s.split(' ') if i]) def main(): s = str(input()) l = word_len(s) print("count =",l) main() 阅读全文
posted @ 2020-06-21 16:33 tf383838 阅读(79) 评论(0) 推荐(0) 编辑
摘要: n=int(input()) max = 0 maxstr = "" for i in range(0, n): s =str(input().lstrip()) if (max < len(s)): max = len(s) maxstr = s print("length=%d"%len(max 阅读全文
posted @ 2020-06-21 16:32 tf383838 阅读(485) 评论(0) 推荐(0) 编辑
摘要: import random x,n=map(int,input().split()) random.seed(x) f=0 for i in range(n): s=set() for j in range(23): c=random.randint(1,365) s.add(c) if len(s 阅读全文
posted @ 2020-06-21 16:31 tf383838 阅读(711) 评论(0) 推荐(0) 编辑