Subtracting hours and adding minutes

Report a typo
The problem statement
Write a program that subtracts N hours and adds M minutes to a date-time pair.

Input data format
The first line contains a date-time pair (year-month-dayThours:minutes). The second line contains two numbers separated by a space: hours to subtract and minutes to add.

Output data format
A single line with a date-time pair (year-month-dayThours:minutes).

Sample Input 1:

2017-12-15T11:11
1 58

Sample Output 1:

2017-12-15T11:09

Sample Input 2:

2016-11-22T00:00
5000 300010

Sample Output 2:

2016-11-22T00:10
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