A special site for solving fun programming problems and challenges, interested in computer science, programming, basics, data structure and algorithms

 P. First digit !

time limit per test
0.25 seconds
memory limit per test
64 megabytes
input
standard input
output
standard output

Given a number X. Print "EVEN" if the first digit of X is even number. Otherwise print "ODD".

For example: In 4569 the first digit is 4, the second digit is 5, the third digit is 6 and the fourth digit is 9.

Input

Only one line containing a number X (999 < X  ≤  9999)

Output

If the first digit is even print "EVEN" otherwise print "ODD".

Examples
input
Copy
4569
output
Copy
EVEN
input
Copy
3569
output
Copy
ODD
Note

Second Example :

In 3569 the first digit is 3 and its ODD.



my code:


#include<iostream>
using namespace std;

int main()
{
	int num;
	cin >> num;
	num /= 1000;
	if (num % 2 == 0)
		cout << "EVEN\n";
	else
		cout << "ODD\n";

	return 0;
}

No comments:

Post a Comment