UPSC CSAT 2025 Q40: Digits in the Square Root of a Number — Solved

If N² = 12345678987654321, then how many digits does the number N have ?

  1. 8
  2. 9
  3. 10
  4. 11

Answer: (b) 9

Solution

  1. Count the digits of N². The number 12345678987654321 rises 1, 2, 3, 4, 5, 6, 7, 8, 9 (9 digits) and then falls 8, 7, 6, 5, 4, 3, 2, 1 (8 digits). Total = 9 + 8 = 17 digits.
  2. Link the digit counts of a number and its square. If N has k digits, then 10^(k−1) ≤ N < 10^k. Squaring gives 10^(2k−2) ≤ N² < 10^(2k). So N² has either 2k − 1 or 2k digits.
  3. Apply this to 17 digits. 2k − 1 = 17 gives k = 9. 2k = 17 gives k = 8.5, which is not a whole number. So k = 9.
  4. Check with powers of 10. A 17-digit number satisfies 10^16 ≤ N² < 10^17. Taking square roots: 10^8 ≤ N < 10^8.5 ≈ 316,227,766. Every whole number from 100,000,000 to 316,227,765 has 9 digits.
  5. Confirm by finding N. Squares of repunits (numbers made only of 1s) follow a pattern: 11² = 121, 111² = 12321, 1111² = 1234321. A repunit with k ones squares to a number that rises 1, 2, …, k and falls back to 1, as long as k ≤ 9. The given number peaks at 9, so N = 111111111.
  6. Count the digits of N: 111111111 has 9 ones, so 9 digits.

Answer: N has 9 digits.

Option-wise explanation

  • a: incorrect — 8 comes from 17 ÷ 2 = 8.5 rounded down. That is the trap: you have to round up. An 8-digit number is less than 10^8, so its square is less than 10^16 and has at most 16 digits. For example, 11111111² = 123456787654321 has only 15 digits.
  • b: correct — A 17-digit square lies between 10^16 and 10^17, so N lies between 10^8 and about 3.16 × 10^8. Every number in that range has 9 digits. Here N = 111111111.
  • c: incorrect — A 10-digit number is at least 10^9, so its square is at least 10^18 and has 19 or 20 digits. That is too many for a 17-digit square.
  • d: incorrect — An 11-digit number squares to 21 or 22 digits. This option only works if you count the 17 digits wrongly or guess from how long the number looks.

How to eliminate

Count the digits of the square: 9 rising and 8 falling, so 17. The rule is: digits of N = (digits of N², rounded up after halving). 17 ÷ 2 = 8.5, which rounds up to 9. You can also pair the digits from the right, as in the long-division square-root method: 1|23|45|67|89|87|65|43|21 makes 9 groups, so the root has 9 digits. If you recognise the repunit pattern (111² = 12321), you can read N = 111111111 straight off the peak digit 9. 10 and 11 are clearly too many. 8 is the round-down slip. About 15–30 seconds. Attempt this one first.

Know more

Digits of a square and its root

If N has k digits, then 10^(k−1) ≤ N < 10^k. Squaring gives 10^(2k−2) ≤ N² < 10^(2k), so N² has 2k − 1 or 2k digits. Going the other way, if a perfect square has d digits, its square root has d/2 digits rounded up.

Digits in N Digits in N²
1 1–2
2 3–4
3 5–6
4 7–8
9 17–18

Pairing method: split the square into pairs of digits starting from the units place. The leftmost group may have only one digit. The number of groups equals the number of digits in the root.

Worked variant: N² = 1522756. It has 7 digits. Pairing gives 1|52|27|56, which is 4 groups, so N has 4 digits. Check: 1234² = 1522756.

Cubes work the same way: a d-digit perfect cube has a cube root with d/3 digits rounded up. Group the digits in threes from the right.

Repunit squares: 11² = 121, 111² = 12321, and so on, up to 111111111² = 12345678987654321. After nine 1s, carries break the pattern.