🔍

首页Home › 数学工具Math

✖️ 把整数改写成若干数之积Rewrite Integer as Product

把每个大于 1 的整数改写成因数乘积:质因数分解,或拆成若干大于 1 的因数(随机,可设种子)。本地处理。Rewrite each integer greater than 1 as a product of factors: prime factorization, or a random factor split (optional seed). Processed locally.

使用说明与常见问题How-to & FAQ

「把整数改写成若干数之积」是什么?What is the Rewrite Integer as Product tool?

把每个大于 1 的整数改写成因数乘积:质因数分解,或拆成若干大于 1 的因数(随机,可设种子)。本地处理。Rewrite each integer greater than 1 as a product of factors: prime factorization, or a random factor split (optional seed). Processed locally.

如何使用「把整数改写成若干数之积」?How do I use the Rewrite Integer as Product tool?

在「把整数改写成若干数之积」中,把内容粘贴或输入到上方输入框,按需设置「方式」、「种子(随机)」,结果会实时显示在下方,点击「复制结果」即可复制。例如输入「12」,得到「12 = 2 x 2 x 3」。Paste integers greater than 1 and choose a "Mode": Prime factors gives the prime factorisation (12 = 2 x 2 x 3) and Random factors splits it into random factors; a "Seed" makes the random split repeatable. Click "Copy result" to copy the output.

怎样输入多个整数?How do I enter several integers?

每行一个,或用空格、逗号、分号分隔。像 1,234,567 这样每 3 位一个逗号的写法按千位分隔读作一个数(所以 10,100 是 10100,要表示两个数请写 10 100);也可以用下划线分组(1_000)。负号可用 -、−(U+2212)或全角 -,全角数字也能识别。小数、科学计数法(1e3)或夹杂文字会报错并指出是第几个、完整显示那个值。One per line, or separated by spaces, commas or semicolons. A value with a comma every three digits, like 1,234,567, is read as one number with thousands separators (so 10,100 is 10100; write 10 100 for two values); underscores also group digits (1_000). Minus can be a hyphen, the Unicode minus (U+2212) or the fullwidth minus, and fullwidth digits work. Decimals, scientific notation (1e3) or stray text give an error naming the position and showing the whole value.

结果精确吗?Are the results exact?

精确。所有整数都按大整数(BigInt)逐位处理,不经过浮点,超过 2^53 的数(例如 9007199254740993)也不会被舍入。粘贴几千上万行也是线性处理,通常在几十毫秒内完成。Yes. Every value is handled as a big integer (BigInt) with no floating-point step, so numbers above 2^53 such as 9007199254740993 are never rounded. Pasting thousands of lines is processed in linear time, usually within tens of milliseconds.

怎样分解大数?How are large numbers factored?

先用小质数试除,再判断是否为质数(前 13 个质数为底的 Miller–Rabin,在 3.3×10^24 以下是确定性的;更大的数再加强 Lucas 检验,即 Baillie–PSW,目前没有已知反例,这样的因数标注「BPSW 概率质数」),合数用 Pollard rho 算法找因数,全程大整数运算。2^61−1 这样的大质数或两个十位质数的乘积通常不到 1 秒。如果某个因数太大、在时限内找不出,会原样保留并标注「未能分解」,不会卡住页面。Small primes are tried first, then primality is tested (Miller–Rabin with the first 13 prime bases, exact below 3.3×10^24; larger values also get a strong Lucas test, i.e. Baillie–PSW, which has no known counterexample, and such factors are marked BPSW probable prime) and Pollard's rho finds factors of composites, all in big-integer arithmetic. A large prime such as 2^61−1, or the product of two ten-digit primes, usually takes well under a second. If a factor is too large to find in time it is left as is and marked (not factored), so the page never freezes.

随机因数是怎样拆的?How does Random factors work?

先求出全部质因数,打乱后随机分成至少两组,每组相乘就是一个因数,所以 360 可能得到 4 x 90 或 6 x 6 x 10。质数无法拆开,会原样输出并说明。相同种子结果相同。All prime factors are found, shuffled and split at random into at least two groups; each group's product is one factor, so 360 may become 4 x 90 or 6 x 6 x 10. A prime cannot be split and is shown as is with a note. The same seed gives the same split.

「把整数改写成若干数之积」免费吗?需要注册吗?Is the Rewrite Integer as Product free? Do I need an account?

「把整数改写成若干数之积」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Rewrite Integer as Product is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.

相关工具Related tools

➕ 把整数改写成若干数之和Rewrite Integer as Sum✖️ 整数相乘Multiply Integers🎲 打乱整数各位数字Shuffle Integer Digits🎲 打乱整数列表顺序Shuffle Integers🔢 排序整数各位数字Sort Integer Digits↕️ 排序整数列表Sort Integers🔺 生成整数三元组(勾股等)Generate Integer Triples🪞 生成对称整数(回文数)Generate Symmetric Integersω 生成冯·诺依曼序数Generate von Neumann Ordinalsω 生成策梅洛序数Generate Zermelo Ordinals✂ 拆分整数(按位数 / 块)Split an Integer✨ 整数写成花体 / 数学字体Write Integers in Fancy Font

← 全部工具All tools