#TCTM15125. Terms of Office
0
Terms of Office
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.在CS City,一个数学生活的地方,市长每4年选举一次,财务主管每2年任命一次,首席程序员每3年当选一次,捕狗人每5年更换一次。
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.
今年,即X年,新当选的市长宣布任命新的财务主管、新的捕狗人,并祝贺首席程序员在最近的选举中获胜。也就是说,所有的任命都改变了。这是非常不寻常的。你会量化这到底有多不寻常。
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.
编写一个程序,输入X年和未来的Y年,并在所有位置发生变化时列出X和Y之间的所有年份。
输入格式
输入X年和未来的Y年。输出格式
并在所有位置发生变化时列出X和Y之间的所有年份。2004
2100
All positions would change in year 2004
All positions would change in year 2064