HELLO EVERYONE
Hiện giờ mình thấy 1 cái challenge rất hay và bổ ích trên reddit
Nguyên văn luật của nó như sau:
Description
No more hiding from your alarm clock! You’ve decided you want your computer to keep you updated on the time so you’re never late again. A talking clock takes a 24-hour time and translates it into words.
Input Description:
An hour (0-23) followed by a colon followed by the minute (0-59).
Output Description:
The time in words, using 12-hour format followed by am or pm.
Sample Input data
00:00
01:30
12:05
14:01
20:29
21:00
Sample Output data
It’s twelve am
It’s one thirty am
It’s twelve oh five pm
It’s two oh one pm
It’s eight twenty nine pm
It’s nine pm
Caution: output kết quả là tiếng anh nha!
Link gốc: https://www.reddit.com/r/dailyprogrammer/comments/6jr76h/20170627_challenge_321_easy_talking_clock/