摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
s1=input() if s1==s1[::-1]: print('yes') else: print('no') 阅读全文
摘要:
ss=input() ss=ss.replace(' ', '') print(ss) 阅读全文
摘要:
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( 阅读全文
摘要:
s=input().strip().split('.') print(s[0].capitalize(), s[1].title(), '',sep='.') 阅读全文
摘要:
n=str(input()) p=str(input()) print(n.count(p)*int(p)) 阅读全文
摘要:
a=input() b=input() def CountAa(s): return s.lower().count(b) if __name__ == "__main__": s = a print(CountAa(s)) 阅读全文
摘要:
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 阅读全文