Multiple of 42

3.5

19 votes
Problem

Problem Statement

Your task is to find the Answer to Life, the Universe, and Everything. More precisely... rewrite numbers from input to output. Stop processing input after reading the number which is divisible by 42.

Input

The only line of input will contain an integer n (1 ≤ n ≤ 109).

Output

Print the integers which are not divisible by 42 & print "The answer to Life, the Universe, and Everything is n" (n is divisible by 42).

Sample Input
1
2
88
99
84
100
393
289
Sample Output
1
2
88
99
The answer to Life, the Universe and Everything is 84
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

Since 84 is divisible by 42 so all the numbers before them will be printed but in case of 84 It will be printed with a message "The answer to Life, the Universe, and Everything is 84".

Contributers:
Editor Image

?