Time to Words
Submissions: 621   Accuracy:

29.63%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

Given a time in the format of hh:mm (12-hour format) 0 < hh < 12, 0 <= mm < 60. The task is to convert it into words

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains two space separated integers 'h' and 'm' denoting hours and minutes respectively.


Output:
Output the input time into words.


Constraints:
1<=T<=10^5
1<=h<=12
1<=m<=60

Example:
Input:

6
6 0
6 10
6 15
6 30
6 45
6 47

Output:
six o' clock
ten minutes past six
quarter past six
half past six
quarter to seven
thirteen minutes to seven


 

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Ayush Govil
Author: Ayush Govil 1


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.