Codeforces: A. Watermelon


The problem is from codeforces: http://www.codeforces.com/problemset/problem/4/A

4A Codeforces: A. Watermelon beginner implementation math non-technical programming languages python tricks

The problem is so easy that you might even falls into the trap (you might think judging if it is even or odd). 2 is even but the answer is NO.

The python solution is very straightforward:

n = int(raw_input())

if (n <= 2):
    print "NO"
elif (n % 2 == 0):
    print "YES"
else:
    print "NO"

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
135 words
Last Post: Codeforces: B. Sum of Digits
Next Post: Codeforces: C. Cd and pwd commands

The Permanent URL is: Codeforces: A. Watermelon

Leave a Reply