06 2020 档案

摘要: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 阅读(487) 评论(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) 编辑
摘要:def Factorial(n): s = 1 for i in range(1,n+1): s = s * i return s def cal(m,n): n_1 = Factorial(n) m_1 = Factorial(m) n_m = Factorial(n-m) return n_1 阅读全文
posted @ 2020-06-21 16:30 tf383838 阅读(311) 评论(0) 推荐(0) 编辑
摘要:import math a,b,c=map(int,input().split()) d = (b**2)-(4*a*c) if a == 0: if b!=0: print('{:.2f}'.format(-(c/b))) elif b==0: print('No') elif a != 0: i 阅读全文
posted @ 2020-06-21 16:29 tf383838 阅读(78) 评论(0) 推荐(0) 编辑
摘要:s1=input() if s1==s1[::-1]: print('yes') else: print('no') 阅读全文
posted @ 2020-06-21 16:23 tf383838 阅读(185) 评论(0) 推荐(0) 编辑
摘要:ss=input() ss=ss.replace(' ', '') print(ss) 阅读全文
posted @ 2020-06-21 16:21 tf383838 阅读(72) 评论(0) 推荐(0) 编辑
摘要:a=input() b=input() x=len(a) y=len(b) c=-len(a) d=-len(b) if x>y: if a[d:]==b: print(b) else: print("no") elif x<y: if a==b[c:]: print(a) else: print( 阅读全文
posted @ 2020-06-21 16:20 tf383838 阅读(320) 评论(0) 推荐(0) 编辑
摘要:s=input().strip().split('.') print(s[0].capitalize(), s[1].title(), '',sep='.') 阅读全文
posted @ 2020-06-21 16:19 tf383838 阅读(162) 评论(0) 推荐(0) 编辑
摘要:n=str(input()) p=str(input()) print(n.count(p)*int(p)) 阅读全文
posted @ 2020-06-21 16:18 tf383838 阅读(130) 评论(0) 推荐(0) 编辑
摘要:a=input() b=input() def CountAa(s): return s.lower().count(b) if __name__ == "__main__": s = a print(CountAa(s)) 阅读全文
posted @ 2020-06-21 16:17 tf383838 阅读(247) 评论(0) 推荐(0) 编辑
摘要:ss=input() n=int(input()) c=input() cnt= list(ss).count(c) if cnt<n: print('no') else: lt=ss.split(c) sum=0 for i in range(n): sum+=len(lt[i])+1 print 阅读全文
posted @ 2020-06-21 16:16 tf383838 阅读(107) 评论(0) 推荐(0) 编辑