I need to determine the values of $a$ and $b$ such that $a-b=33333$ with using $9$ cards ($i$-th card represents $i$).

34 Views Asked by At

$9$ cards are given ($i$-th card represents $i$) and $2$ following numbers are defined by using all $9$ cards.

$a:=5$ digits natural number which are given by concatenating $5$ cards.

$b:=4$ digits natural number which are given by concatenating $4$ cards.

And I have to determine $a$ and $b$ such that $a-b=33333.$

I've read the solution but I can't get the following.

Define $p,q$ as sums of each digit of $a,b$ respectively.

$p-q\equiv 3\times5\equiv 6 \pmod 9$

How this congruence is obtained?.

1

There are 1 best solutions below

0
On BEST ANSWER

The sum of the digits of a number is equivalent to that number modulo $9$ (you can prove this by stating a number generally as $a_n \cdot 10^n + a_{n-1}\cdot 10^{n-1}+\dots + a_0,$ where $a_i\in \{0,1,\dots, 9\}.$ Hence $p\equiv a\pmod 9\wedge q\equiv b\pmod 9\Rightarrow p-q\equiv a-b\pmod 9.$ But $a-b\pmod 9 \equiv 3\times 5\equiv 6\pmod 9$ as $3\times 5$ is the sum of the digits of $33333$.