VM7WC '15 #1 Bronze - Goon

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Mr. Ing keeps getting phone calls during class, but when he picks up, no one's there! In order to decide whether the number is legitimate or not, he devises an algorithm.

Let the phone number N be in the form abc-def-ghij where a, b, c, d, e, f, g, h, i, j are digits. If a+b+c=d+e+f=g+h+i+j then consider the call to be a fake and output Goony!. If not, output Pick up the phone!.

Sample Input

519-627-5226

Sample Output

Goony!

Comments