Easy, 1 line solution in java

@ChristyTan no,because the problem tell us both you and your frinend have optimal strategies for the game so when the number is 6 you must choose 2 firstly and then no matter what he choose you will win



@ChristyTan Note the condition that "both you and your friend have optimal strategies". So this is actually a game strategy design whether you can GUARANTEE to win the game no matter how you friend makes a move. If you can GUARANTEE, return true; otherwise, return false. So the result is not random.