Problem Description Sherlock and Watson are playing the following modified version of Nim game: There are n piles of stones denoted as ,,...,, and n is a prime number; Sherlock always plays first, and Watson and he move in alternating turns. During e…