VM7WC '15 #1 Bronze - Goon

View as PDF

Submit solution

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

Author:
Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

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


  • -17
    Jeffmagma  commented on July 21, 2016, 10:56 p.m.

    This comment is hidden due to too much negative feedback. Click here to view it.