Add days and subtract hours

Report a typo

Write a program that changes the given point of time: adds a certain number of days and subtracts a few hours.

Input and output date-time like this "2017-12-31T22:30".

Input data format

The single line containing date-time and two numbers: days to add and hours to subtract. Input elements are separated by spaces.

Output data format

The output must contain only a date-time in the specified format.

Sample Input 1:

2017-12-31T22:30 10 5

Sample Output 1:

2018-01-10T17:30
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