### BlueBook

## p307ex9: Leap Year

Given T (1 ≤ T ≤ 10000) non-negative year values, where each year Y is 0 ≤ Y ≤ 1000000, determine whether or not each one is a leap year.

Remember: A year is a leap year if it is divisible by 4 but not by 100 or if it is divisible by 400. 0 is considered a leap year.

### Input

Line 1: A single integer representing the number of test cases (years to be entered)

Next T lines: Each year value

### Output

Lines 1..T: one integer "1" or "0" denoting whether N is a leap year. Output "1" if N is a leap year, and "0" otherwise.

### Sample Input

4 0 4 100 400

### Sample Output

1 1 0 1

All Submissions

Best Solutions

**Point Value:** 3

**Time Limit:** 2.00s

**Memory Limit:** 16M

**Added:** Oct 27, 2008

**Languages Allowed:**

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

## Comments (Search)

BrandonTDon Aug 08, 2013 - 2:23:31 pm UTC compile failureCompile failed

/var/jail/safeplace/122018.java/p307ex9.java:10: cannot find symbol

symbol : variable num0

location: class p307ex9

(line in my code)

^

1 error

Alexon Aug 08, 2013 - 11:36:03 pm UTC Re: compile failureThis is a known bug that has to be fixed. For now, changing: to

should circumvent the bug and make your submission accepted.

BrandonTDon Aug 09, 2013 - 3:44:45 am UTC Re: compile failure