add  a first solution for game1

have passed leet code test case