achive function of input num output game result