Prison - MarisaOJ: Marisa Online Judge

Prison

Time limit: 1000 ms
Memory limit: 256 MB
A prisoner receives a sentence of x days and begins serving the sentence starting from the date d, month m, year y. Determine the date on which the prisoner will be released. ### Input - A single line containing four integers x,d,m,y. ### Output - Print three integers representing the day, month, and year when the prisoner is released. ### Constraints - The date is valid. - 1≤x≤1015. - 1≤y≤2023. ### Sample Input: 52712000 Output: 122000