🔍

首页Home › 数学工具Math

🔢 排序整数各位数字Sort Integer Digits

把每个整数的各位数字按升序或降序排列,保留符号。本地处理。可设置「顺序」、「去掉前导零」。Sort the digits of each integer ascending or descending, keeping the sign. Processed locally. Settings: Order, Drop leading zeros.

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

「排序整数各位数字」是什么?What is the Sort Integer Digits tool?

把每个整数的各位数字按升序或降序排列,保留符号。本地处理。可设置「顺序」、「去掉前导零」。Sort the digits of each integer ascending or descending, keeping the sign. Processed locally. Settings: Order, Drop leading zeros.

如何使用「排序整数各位数字」?How do I use the Sort Integer Digits tool?

在「排序整数各位数字」中,把内容粘贴或输入到上方输入框,按需设置「顺序」,结果会实时显示在下方,点击「复制结果」即可复制。例如输入「3142」,得到「1234」。Paste integers and choose the "Order": Ascending sorts each number's digits from smallest to largest (3142 becomes 1234) and Descending the other way; the sign is kept. Tick "Drop leading zeros" if needed and 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.

负数和 0 怎么排?How are negatives and zeros handled?

只排列数字本身(绝对值的各位),负号原样留在最前面:-3142 升序得到 -1234,降序得到 -4321。这是“数字排序”,不是让结果在数值上最大或最小。0 默认保留,1000 升序得到 0001;勾选「去掉前导零」得到 1。Only the digits themselves (of the absolute value) are sorted and the minus sign stays in front: -3142 ascending gives -1234 and descending gives -4321. This sorts digits; it does not make the result numerically largest or smallest. Zeros are kept by default, so 1000 ascending gives 0001; tick Drop leading zeros to get 1.

输入和输出是什么样的?What does the input and output look like?

例如在「排序整数各位数字」中输入 3142,输出为:1234(⏎ 表示换行)。For example, the Sort Integer Digits turns the input 3142 into: 1234 (⏎ marks a line break).

有哪些选项可以调整?What options can I adjust?

「排序整数各位数字」的设置:「顺序」可选 升序、降序(默认 升序);可勾选:「去掉前导零」。改动任一选项后结果会按新设置重新生成。Settings in the Sort Integer Digits — "Order": Ascending, Descending (default Ascending); tick boxes: "Drop leading zeros". Changing any option regenerates the result with the new setting.

「排序整数各位数字」免费吗?需要注册吗?Is the Sort Integer Digits free? Do I need an account?

「排序整数各位数字」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Sort Integer Digits 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

↕️ 排序整数列表Sort Integers🔁 反转整数各位数字Reverse Integer Digits🔺 生成整数三元组(勾股等)Generate Integer Triples🪞 生成对称整数(回文数)Generate Symmetric Integersω 生成冯·诺依曼序数Generate von Neumann Ordinalsω 生成策梅洛序数Generate Zermelo Ordinals✂ 拆分整数(按位数 / 块)Split an Integer✨ 整数写成花体 / 数学字体Write Integers in Fancy Font➗ 找出全部因数Find All Divisors📈 生成盈数(丰数)Generate Abundant Numbers≈ 生成几乎完全数Generate Almost Perfect Numbers📉 生成亏数Generate Deficient Numbers

← 全部工具All tools