Problem

Source: 2022 South Russian Girls MO - Assara Juniors p4

Tags: number theory, greatest common divisor



Nadya has $2022$ cards, each with a number one or seven written on it. It is known that there are both cards.Nadya looked at all possible $2022$-digit numbers that can be composed from all these cards. What is the largest value that can take the greatest common divisor of all these numbers?