模幂运算

計算 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)