返回题库

最接近平方根的因子分解

Smallest Factorizaiton

专题
Brainteaser / 脑筋急转弯
难度
L4

题目详情

12345678901234567890 不是质数,因此可以写成 ababa,ba,b 为正整数)。

a+ba^*+b^*,其中 ab=1234567890a^*b^*=1234567890,且对任意其它满足 ab=1234567890ab=1234567890 的因子对,都有

abab.|a-b|\ge |a^*-b^*|.

提示:可考虑质因数分解。

英文原题

The number 12345678901234567890 is not prime, so it can be written in the form abab for two positive integers aa and bb. Find a+ba^* + b^*, where aa^* and bb^* satisfy ab=1234567890a^*b^* = 1234567890 and for any other pair (a,b)(a,b) such that ab=1234567890ab = 1234567890, abab|a-b| \geq |a^* - b^*|. It may be helpful to consider the prime factorization.

解析

要使 ab|a-b| 最小,相当于让 a,ba,b 尽量接近 N\sqrt{N}

枚举 a1234567890a\le \sqrt{1234567890} 的所有因子可得最接近的一对为

(a,b)=(34227, 36070).(a^*,b^*)=(34227,\ 36070).

因此

a+b=70297.\boxed{a^*+b^*=70297}.

英文解析

To minimize ab|a-b| is to keep a,ba,b as close as possible to N\sqrt{N}.

The closest possible pair of all factors to enumerate a1234567890a\le \sqrt{1234567890} is

(a,b)=(34227,\36070).(a^*,b^*)=(34227,\36070).

Therefore,

a+b=70297.\boxed{a^*+b^*=70297}.