解题思路:
注意事项:
参考代码:nums = {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'}
nums[30] = 'thirty'
nums[40] = 'forty'
nums[50] = 'fifty'
h,m= map(int,input().split())
if h in nums:
print(nums[h],end=' ')
elif h not in nums:
a = h - h%10
b = h%10
print(nums[a],end=' ')
print(nums[b],end=' ')
if m == 0:
print("o'clock")
else:
if m in nums:
print(nums[m],end=' ')
elif m not in nums:
a = m - m%10
b = m%10
print(nums[a],end=' ')
print(nums[b],end=' ')
0.0分
0 人评分