Problems
545 - Leap Year
SUBMIT PROBLEM

Leap Year

Time Limit: 1 sec

 

The Problem

Leap Year is a year that is divisible by 4 and not divisible by 100 with the exception that years that are divisible by 400 are also leap year. Leap Year containing one additional day that means this year has 366 days instead of the usual 365, by extending February to 29 days rather than the common 28.

Given an year you will have to determind that the year is Leap Year or not.

 

The Input

The first line contains a positive integer T ( 1<=T<=100), denoting the number of test case. The next T lines will contain one integers Y(1<=Y<=1000000) which is denoted the year.

 

The Output

For each case, print "Leap year" if the year is Leap Year otherwise print "Ordinary year" in seperate line.

 

Sample Input

3

2016

1900

2000

 

Sample Output

Leap year

Ordinary year

Leap year

 

 

 

Problem Setter: Shahin ShamS