Problem

Source: CSMO 2019 Grade 11 Problem 7

Tags: combinatorics, Combinatorial games



Amy and Bob choose numbers from $0,1,2,\cdots,81$ in turn and Amy choose the number first. Every time the one who choose number chooses one number from the remaining numbers. When all $82$ numbers are chosen, let $A$ be the sum of all the numbers Amy chooses, and let $B$ be the sum of all the numbers Bob chooses. During the process, Amy tries to make $\gcd(A,B)$ as great as possible, and Bob tries to make $\gcd(A,B)$ as little as possible. Suppose Amy and Bob take the best strategy of each one, respectively, determine $\gcd(A,B)$ when all $82$ numbers are chosen.