How many years from next traveling


Submit solution

Points: 10
Time limit: 1.0s
Memory limit: 64M

Authors:
Problem type
Allowed languages
Java 19, Java 8

題目說明

小明家在2005年開始第一次出國旅遊後留下許多美好回憶,
於是決定接下來每4年會安排一次出國旅遊。
請讓小明輸入一個西元年份,幫他計算該年分距離下一次出國旅遊還要幾年。

輸入

西元年 (n>2005, n:整數)

輸出

距離下次出國還要幾年

sample input & output

輸入 輸出
DataSet1 2006 3
DataSet2 2007 2
DataSet3 2009 0

Comments

There are no comments at the moment.