摘要: 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) 编辑