MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / fermat_little_theorem.py

File fermat_little_theorem.py

maths/fermat_little_theorem.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1# Python program to show the usage of Fermat's little theorem in a division
2# According to Fermat's little theorem, (a / b) mod p always equals
3# a * (b ^ (p - 2)) mod p
4# Here we assume that p is a prime number, b divides a, and p doesn't divide b

Callers

nothing calls this directly

Calls 1

binary_exponentiationFunction · 0.85

Tested by

no test coverage detected