Problems
563 - Time Converter
SUBMIT PROBLEM

Time Converter

Time Limit: 0.5 sec

 

The Problem

Develop a program that, given a duration in minutes, convert the minutes to days, hours, and minutes.

 

Example:

8718 Minutes = 6 Days 1 Hours 18 Minutes

 

[Note: There are 60 minutes in an hour and 24 hours in a day.]

 

The Input

Input starts with an integer T(1<=T<=100), denoting the number of test cases. Each test case contains one integers M (0<=M<=1000000) which is the duration in minutes.

 

The Output

For each test case, print "Case X: A Days B Hours C Minutes" here X is the case number stating from 1, A is the Days, B is the hours, and C is the minutes.

 

Sample Input

2

22

1501

 

Sample Output

Case 1: 0 Days 0 Hours 22 Minutes

Case 2: 1 Days 1 Hours 1 Minutes

 

 

 

 

Problem Setter: Shahin ShamS