Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Modular-exponentiation/11l/modular-exponentiation.11l
Normal file
14
Task/Modular-exponentiation/11l/modular-exponentiation.11l
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
F pow_mod(BigInt =base, BigInt =exponent, BigInt modulus)
|
||||
BigInt result = 1
|
||||
|
||||
L exponent != 0
|
||||
I exponent % 2 != 0
|
||||
result = (result * base) % modulus
|
||||
exponent I/= 2
|
||||
base = (base * base) % modulus
|
||||
|
||||
R result
|
||||
|
||||
print(pow_mod(BigInt(‘2988348162058574136915891421498819466320163312926952423791023078876139’),
|
||||
BigInt(‘2351399303373464486466122544523690094744975233415544072992656881240319’),
|
||||
BigInt(10) ^ 40))
|
||||
Loading…
Add table
Add a link
Reference in a new issue