返回题库

立方数首位概率

what is the probability that cubic

专题
Probability / 概率
难度
L4

题目详情

xx 为 1 到 101210^{12} 之间均匀随机整数,求 x3x^3 的十进制末两位是 51 的概率。

英文原题

Let xx be an integer between 1 and 101210^{12} , what is the probability that cubic of xx ends with 51?

解析

末两位只取决于 x(mod100)x\pmod{100},故需解

x351(mod100).x^3\equiv 51\pmod{100}.

等价分解为模 4 与模 25:

  • 513(mod4)51\equiv 3\pmod 4,故 x3(mod4)x\equiv 3\pmod 4
  • 在模 25 下,逐步可得唯一解 x1(mod25)x\equiv 1\pmod{25}

中国剩余定理给出在模 100 下唯一解:

x51(mod100).x\equiv 51\pmod{100}.

在每 100 个连续整数里恰有 1 个满足。又 101210^{12} 是 100 的倍数,所以概率为

1100.\boxed{\frac{1}{100}}.

英文解析

The last two digits depend only on x(mod100)x \pmod{100}, so we need to solve

x351(mod100).x^3 \equiv 51 \pmod{100}.

This is equivalent to decomposing into modulo 4 and modulo 25:

  • Since 513(mod4)51 \equiv 3 \pmod 4, we have x3(mod4)x \equiv 3 \pmod 4;
  • Under modulo 25, we can iteratively obtain the unique solution x1(mod25)x \equiv 1 \pmod{25}.

The Chinese Remainder Theorem gives the unique solution modulo 100:

x51(mod100).x \equiv 51 \pmod{100}.

There is exactly one such integer in every 100 consecutive integers. Since 101210^{12} is a multiple of 100, the probability is

1100.\boxed{\frac{1}{100}}.