Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 02bc991

Browse files
Update README.md
1 parent 62a3c5d commit 02bc991

File tree

1 file changed

+2
-2
lines changed
  • Competitive Coding/Math/Primality Test/Fermat Method

1 file changed

+2
-2
lines changed

‎Competitive Coding/Math/Primality Test/Fermat Method/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Given a number n, check if it is prime or not. This method is a probabilistic m
33
Fermat's Little Theorem:
44
If n is a prime number, then for every a, 1 <= a < n,
55

6-
a^n-1 = 1 mod (n)
6+
a^n-1 ~ 1 mod (n)
77
OR
8-
a^n-1 % n = 1
8+
a^n-1 % n ~ 1
99

1010

1111
Example:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /