模幂运算

计算 base^exponent mod modulus,适用于大整数模运算。

输入: 文本结果: 文本

文本输入

工具选项

案例

using input field for base

输入

5

Expected answer

JSON
6
Base
(empty)
模数
7
指数
3
using input field for exponent

输入

4

Expected answer

JSON
5
Base
2
模数
11
指数
(empty)
base one

输入

Expected answer

JSON
1
Base
1
模数
1000
指数
999
basic example (2^10 mod 1000)

输入

Expected answer

JSON
24
Base
2
模数
1000
指数
10
crypto-sized numbers (RSA-2048 simulation)

输入

Expected answer

JSON
1
Base
12345678901234567890123456789012345678901234567890
模数
99999999999999999999999999999999999999999999999999
指数
0
exponent zero

输入

Expected answer

JSON
1
Base
999
模数
100
指数
0
Fermat's Little Theorem (a^(p-1) mod p = 1)

输入

Expected answer

JSON
1
Base
3
模数
11
指数
10
hexadecimal input

输入

Expected answer

JSON
256
Base
0x10
模数
1000
指数
0x2
large base and exponent

输入

Expected answer

JSON
560583526
Base
123456789
模数
1000000007
指数
65537
RSA-like example (small)

输入

Expected answer

JSON
561
Base
123
模数
1000
指数
456

参数

参数默认值输入与选项
Base""文本
模数"1"文本
指数""文本

相关工具

算术 / 逻辑

操作参考

查看原始技术文档 (English)