using System; public class Test { public static void Main() { // your code goes here for (int i = 1989; i <= 2000; i ++) { Console.WriteLine("{0}\t{1}", i, getLeap(i)); } for (int i = 2000; i <= 3000; i += 100) { Console.WriteLine("{0}\t{1}", i, getLeap(i)); } } static int getLeap(int y) { return (1 - (y % 4 + 2) % (y % 4 + 1)) * ((y % 100 + 2) % (y % 100 + 1)) + (1 - (y % 400 + 2) % (y % 400 + 1)); } }