[BOJ 6888] Terms of Office

View as PDF

Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 128M

Problem types
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

In CS City, a mathematical place to live, the mayor is elected every 4 years, the treasurer is appointed every 2 years, the chief programmer is elected every 3 years and the dog-catcher is replaced every 5 years.</p>

This year, Year $X$, the newly elected mayor announced the appointment of the new treasurer, a new dog-catcher and congratulated the chief programmer for winning the recent election. That is, all positions were changed over. This is highly unusual. You will quantify how unusual this really is.

Write a program that inputs the year $X$ and the future year $Y$ and lists all years between $X$ and $Y$ inclusive when all positions change.

입력 형식

출력 형식

예제 입력

2004
2100

예제 출력

All positions change in year 2004
All positions change in year 2064

Comments

There are no comments at the moment.