L1-7 念数字

dic={'0':'ling','1':'yi','2':'er','3':'san','4':'si','5':'wu','6':'liu','7':'qi','8':'ba','9':'jiu'}
n=input()
s=[]
if n[0]=='-':
s.append('fu')
for x in n[1:]:
s.append(dic[x])
print(' '.join(s))
else:
for x in n:
s.append(dic[x])
print(' '.join(s))
L1-8 求整数段和

a,b=map(int,input().split())
sum=0
for i in range(b-a+1):
x=a+i
sum+=(x)
print(f"{x:>5}",end='')
if (i+1)%5==0:
print()
if (b-a+1)%5!=0:
print()
print(f'Sum = {sum}')
L1-10 比较大小

a=list(map(int,input().split()))
a.sort()
print('->'.join(map(str,a)))
L1-13 计算阶乘和

n=int(input())
factor=[1]*(n+1)
for i in range(1,n+1):
factor[i]=factor[i-1]*i
print(sum(factor[1:]))
L1-18 大笨钟

from datetime import time
# t=time(10,5,6)
# print(t)
h1,m1=input().split(":")
hh,mm=map(int,[h1,m1])
t=time(hh,mm)
if t>time(12) and t<=time(23,59):
if mm>0:
print("Dang"*(hh+1-12))
else:print("Dang"*(hh-12))
else:
print(f"Only {h1}:{m1}. Too early to Dang.")
L1-22奇偶分家

n=int(input())
a=list(map(int,input().split()))
cnt1,cnt2=0,0
for x in a:
if x%2==0:
cnt1+=1
else:
cnt2+=1
print(cnt2,cnt1)
L1-28 判断素数

def is_prime(x):
if x<=1:
return False
for i in range(2,int(x**0.5)+1):
if x%i==0:
return False
return True
n=int(input())
for i in range(n):
x=int(input())
if is_prime(x):
print('Yes')
else:
print('No')
L1-31 到底是不是太胖了

n=int(input())
for i in range(n):
h,w=map(int,input().split())
ww=(h-100)*0.9*2
if abs(ww-w)<ww*0.1:
print("You are wan mei!")
else:
if w>ww:
print('You are tai pang le!')
else:
print('You are tai shou le!')
L1-37 A除以B

a,b=map(int,input().split())
if b==0:
print(f'{a}/{b}=Error')
elif b<0:
print(f'{a}/({b})={a/b:.2f}')
else:
print(f'{a}/{b}={a/b:.2f}')
L1-40最佳情侣身高差

n=int(input())
for i in range(n):
sex,h=input().split()
h=float(h)
if sex=='F':
h=h*1.09
else:
h=h/1.09
print("{:.2f}".format(h))
L1-41 寻找250

a=list(map(int,input().split()))
print(a.index(250)+1)
L1-47 装睡

n=int(input())
for i in range(n):
people=input().split()
name=people[0]
breath=int(people[1])
pulse=int(people[2])
if(breath<15 or breath>20 or pulse<50 or pulse>70):
print(name)
L1-53 电子汪

a,b=map(int,input().split())
for i in range(a+b):
print("Wang!",end="")
L1-55 谁是赢家

pa,pb=map(int,input().split())
li_judge=input().split() #0--a 1--b
cnta=li_judge.count('0')
cntb=li_judge.count('1')
if (pa>pb and cnta>=1) or (pb>pa and cnta==3):
print(f'The winner is a: {pa} + {cnta}')
elif (pa<pb and cntb>=1) or (pb<pa and cntb==3):
print(f'The winner is b: {pb} + {cntb}')