• + 1 comment

    This game is composed of the repeating group of LWWWWWL Therefore the solution in Java is like this --> System.out.println(scanner.nextInt()%7<2?"Second":"First");

    Source: https://www.cs.umd.edu/~gasarch/COURSES/250/S15/nimnotes.pdf