Some hours and minutes ago

Report a typo

Write a program that reads a point in time and prints another point in time at the specified number of hours and minutes before the given one.

Input data format

The first line contains a point in time in hours:minutes format. The second line contains two numbers: hours and minutes separated by a space.

Output data format

The single output line should contain a point in time before the input time in the same format.

Sample Input 1:

18:10
2 30

Sample Output 1:

15:40
Write a program in Java 17
class Main {
public static void main(String[] args) {
// put your code here
}
}
___

Create a free account to access the full topic