解题思路:
注意事项:
参考代码:
h,m=map(int,input().split()) d={0:'zero', 1: 'one', 2:'two', 3:'three', 4:'four', 5:'five', 6:'six', 7:'seven', 8:'eight', 9:'nine', 10:'ten', 11:'eleven', 12:'twelve', 13:'thirteen', 14:'fourteen', 15:'fifteen', 16:'sixteen', 17:'seventeen', 18:'eighteen', 19:'nineteen', 20:'twenty'} d2={'2':'twenty','3':'thirty','4':'forty','5':'fifty'} def r(n): if str(n)[1]!='0': return f"{d2[str(n)[0]]} {d[int(str(n)[1])]}" else: return f"{d2[str(n)[0]]}" if h<=20: print(d[h],end=' ') else: print(r(h),end=' ') if m ==0: print("o'clock") elif 0<m<=20: print(d[m]) else: print(r(m))
0.0分
0 人评分