解题思路:
注意事项:
参考代码:
#蓝桥杯基础练习VIP-报时助手Python版 H=['zero','one','two','three','four','five','six','seven','eight','nine','ten','eleven','twelve', 'thirteen','fourteen','fifteen','sixteen','seventeen','eighteen','nineteen','twenty','twenty one','twenty two','twenty three'] M=['','','twenty','thirty','forty','fifty'] h,m=map(int,input().strip().split()) if m==0: print(H[h]+' '+'o\'clock') else: print(H[h],end=' ') if m<24: print(H[m]) else: m1=m//10 m2=m%10 if m2==0: print(M[m1]) else: print(M[m1]+' '+H[m2])
0.0分
2 人评分
C语言程序设计教程(第三版)课后习题8.9 (C语言代码)浏览:677 |
C语言程序设计教程(第三版)课后习题6.1 (C语言代码)浏览:613 |
C语言训练-求PI* (C语言代码)浏览:616 |
【金明的预算方案】 (C++代码)浏览:952 |
C语言程序设计教程(第三版)课后习题6.5 (C++代码)浏览:464 |
IP判断 (C语言代码)浏览:784 |
【计算两点间的距离】 (C语言代码)浏览:1501 |
核桃的数量 (C语言代码)浏览:683 |
C语言程序设计教程(第三版)课后习题5.6 (C语言代码)浏览:577 |
数列排序 (C语言代码)浏览:618 |