560 - Even Or Odd
Even Or Odd
Time Limit: 0.5 sec
The Problem
You are given a number N. You need to determine N! is even or odd.
Factorial N is written as N! and N! = 1∗2∗3∗. . .∗(N−1)∗N.
For example,
0! = 1
1! = 1
2! = 1 x 2 = 2
3! = 1 x 2 x 3 = 6
4! = 1 x 2 x 3 x 4 = 24
5! = 1 x 2 x 3 x 4 x 5 = 120
etc.
The Input
Input starts with an integer T(1<=T<=100), denoting the number of test cases. Each test case contains an integer N(0<=N<=10^9).
The Output
For each test case, print "EVEN" if N! is even and "ODD" if not even.
Sample Input
2
1
10
Sample Output
ODD
EVEN
Problem Setter: Murad Al Wajed [Bangladesh University of Business and Technology]