#B4260. Calculate Future Date and Time
Calculate Future Date and Time
Calculate Future Date and Time
Given a date represented by \( y \) (year), \( m \) (month), \( d \) (day), and \( h \) (hour) along with an integer \( k \) (number of hours to add), compute the future date and time represented as \( y' \), \( m' \), \( d' \), \( h' \). All formulas in this description are in \( \LaTeX \) format. For example, if today is \( y=2023,\ m=12,\ d=31,\ h=22 \) and \( k=5 \), then after adding \( k \) hours the new date becomes \( y'=2024,\ m'=1,\ d'=1,\ h'=3 \).
inputFormat
The input consists of five space-separated integers: \( y \), \( m \), \( d \), \( h \) and \( k \).\( y, m, d, h \) denote the year, month, day and hour respectively, and \( k \) represents the number of hours to add.
outputFormat
Output four space-separated integers: \( y' \), \( m' \), \( d' \), \( h' \) which represent the resulting year, month, day and hour after adding \( k \) hours.
sample
2023 1 1 0 1
2023 1 1 1