Sign in
Please select an account to continue using cracku.in
↓ →
Join Our JEE Preparation Group
Prep with like-minded aspirants; Get access to free daily tests and study material.
Let $$p, q$$ be two-digit numbers neither of which are divisible by $$10$$. Let $$r$$ be the four-digit number by putting the digits of $$p$$ followed by the digits of $$q$$ (in order). As $$p, q$$ vary, a computer prints $$r$$ on the screen if $$\gcd(p,q)=1$$ and $$p+q$$ divides $$r$$. Suppose that the largest number that is printed by the computer is $$N$$. Determine the number formed by the last two digits of $$N$$ (in the same order).
Correct Answer: 13
Let the two-digit numbers be written in decimal form as
$$p = 10a + b,\qquad q = 10c + d$$
with digits $$a,b,c,d \in \{0,1,\dots ,9\}$$, where $$a,c \neq 0$$ because $$p,q$$ have two digits and $$b,d \neq 0$$ because they are not divisible by $$10$$.
When the computer writes the four-digit number $$r$$ by appending the digits of $$p$$ followed by those of $$q$$, we obtain
$$r = 100p + q\;.\quad -(1)$$
The conditions given are
1. $$\gcd(p,q)=1$$,
2. $$p+q$$ divides $$r$$.
Denote $$s = p+q$$. Using $$(1)$$, the divisibility requirement is
$$s \mid (100p + q).$$
Because $$q = s-p$$, substitute to get
$$100p + q \;=\; 100p + (s-p) \;=\; 99p + s.$$
Thus
$$s \mid (99p + s)\;\Longrightarrow\; s \mid 99p.$$
Now, $$\gcd(p,s)=\gcd\bigl(p,p+q\bigr)=\gcd(p,q)=1$$ by condition 1. Since $$p$$ is coprime to $$s$$ and $$s\mid 99p$$, we must have
$$s \mid 99.\quad -(2)$$
The positive divisors of $$99$$ are $$1,3,9,11,33,99$$. But $$s=p+q$$ is the sum of two two-digit numbers, so $$20 \le s \le 198$$. Hence, from (2), the only possibilities are
$$s = 33 \quad \text{or} \quad s = 99.$$
Case 1: $$p+q = 99$$Here $$q = 99 - p$$. To keep $$q$$ two-digit we need $$10 \le q \le 89\;\Longrightarrow\; 10 \le p \le 89$$.
The four-digit number equals
$$r = 100p + q = 100p + (99-p) = 99p + 99.$$
Because the coefficient of $$p$$ is positive, $$r$$ increases with $$p$$, so we search downward from the largest admissible $$p=89$$ until all conditions are met.
| p | q=99-p | Units digits | gcd(p,q) | Admissible? |
| 89 | 10 | q ends in 0 | — | No |
| 88 | 11 | ok | 11 | No |
| 87 | 12 | ok | 3 | No |
| 86 | 13 | ok | 1 | Yes |
The first admissible value is $$p=86,\;q=13$$, giving
$$r = 100\,(86)+13 = 8613.$$
Any smaller $$p$$ yields a smaller $$r$$, so this is the largest $$r$$ in Case 1.
Now $$q = 33 - p$$ with $$10 \le p \le 23$$ to keep both two-digit.
Here
$$r = 100p + q = 99p + 33,$$
again increasing with $$p$$. Testing downwards:
| p | q=33-p | Units digits | gcd(p,q) | Admissible? |
| 23 | 10 | q ends in 0 | — | No |
| 22 | 11 | ok | 11 | No |
| 21 | 12 | ok | 3 | No |
| 20 | 13 | p ends in 0 | — | No |
| 19 | 14 | ok | 1 | Yes |
This gives $$r = 100\,(19)+14 = 1914,$$ which is far smaller than $$8613$$ from Case 1.
Therefore the largest four-digit number printed by the computer is $$N = 8613.$$ The last two digits of $$N$$ are $$\boxed{13}$$.
Predict your JEE Main percentile, rank & performance in seconds
Educational materials for JEE preparation