report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Prison - FlandreOJ: Flandre 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 \le x \le 10^{15}$. - $1 \le y \le 2023$. ### Sample Input: ``` 5 27 1 2000 ``` Output: ``` 1 2 2000 ```
Other problems (Level 0)
Sum of divisors
Equal pairs
GCD and LCM
3
String queries
Consecutive
Prison
Topic
Basic
Rating 1300
Solution (2) Solution