Coding Solution of A Knife Game