Problem:
Score : 100 points

Problem Statement

In some other world, today is December D-th.

Write a program that prints Christmas if D = 25, Christmas Eve if D = 24, Christmas Eve Eve if D = 23 and Christmas Eve Eve Eve if D = 22.

Constraints

22 \leq D \leq 25

D is an integer.

Input

Input is given from Standard Input in the following format:

D

Output

Print the specified string (case-sensitive).

Sample Input 1

25

Sample Output 1

Christmas

Sample Input 2

22

Sample Output 2

Christmas Eve Eve Eve

Be sure to print spaces between the words.

Solution in Scala (2.11.7) (judge verdict: Runtime Error)

object Main extends App {
  val in = new java.util.Scanner(System.in)
  val N = in.nextInt
  val X = in.nextLong

  val ls = (1 to N).scanLeft(1L)((z, i) => z * 2 + 3).toArray
  val ps = (1 to N).scanLeft(1L)((z, i) => z * 2 + 1).toArray

  def count(l: Int, eat: Long): Long = {
    if (l == 0) (if (eat <= 0) 0 else 1)
    else if (eat <= 1 + ls(l - 1)) count(l - 1, eat - 1)
    else ps(l - 1) + 1 + count(l - 1, eat - ls(l - 1) - 2)
  }

  println(count(N, X))
}