# 4. Variant 1

A number with the sum of its digits equal to 2021 was divided by 7, resulting in a number that is written only with the digit 7. How many digits 7 can be in it? If there are multiple answers, indicate their sum.
Answer: 503.

Solution. By multiplying $777 \ldots 77$ and 7 in a column, we get 54...439. Let $x$ be the number of sevens in the original number, then the number of fours in the resulting product is $x-2$. Its sum of digits is $4(x-2)+5+3+9=4x+9$, but on the other hand, it is equal to 2021, so $x=\frac{2021-9}{4}=$ $\frac{2012}{4}=503$.

## Variant 2

A number with a digit sum of 3333 was divided by 7, resulting in a number that is written only with the digit 7. What can be the number of sevens in it? If there are several answers, indicate their sum.

Answer: 831.

## Variant 3

A number with a digit sum of 7777 was divided by 7, resulting in a number that is written only with the digit 7. What can be the number of sevens in it? If there are several answers, indicate their sum.

Answer: 1942

## Variant 4

A number with a digit sum of 4321 was divided by 7, resulting in a number that is written only with the digit 7. What can be the number of sevens in it? If there are several answers, indicate their sum.

Answer: 1078.

## Variant 5

A number with a digit sum of 2345 was divided by 7, resulting in a number that is written only with the digit 7. What can be the number of sevens in it? If there are several answers, indicate their sum.

Answer: 584.