Yahoo interview question

Please code a game 1048