Terms of Office
시간 제한: 1000ms메모리 제한: 128MB출처: CCC 2004 JuniorBOJ 6888
문제
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.
This year, Year , 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 and the future year and lists all years between and inclusive when all positions change.
예제
예제 1
입력
2004 2100
출력
All positions change in year 2004 All positions change in year 2064
코드를 제출하려면 로그인하세요.