2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
8
Task/Modular-inverse/JavaScript/modular-inverse.js
Normal file
8
Task/Modular-inverse/JavaScript/modular-inverse.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
var modInverse = function(a, b) {
|
||||
a %= b;
|
||||
for (var x = 1; x < b; x++) {
|
||||
if ((a*x)%b == 1) {
|
||||
return x;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue