2004 Canadian Computing Competition, Stage 1

Problem J2: Terms of Office

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 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.

Sample Input

2004
2100

Sample Output

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

All Submissions
Best Solutions


Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Added: Sep 29, 2008

Problem Types: [Show]

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

hulk luv lil pump
whiskey is giao giao man(the poison of the underground)