Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
10
Task/Modular-inverse/FutureBasic/modular-inverse.basic
Normal file
10
Task/Modular-inverse/FutureBasic/modular-inverse.basic
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
NSInteger local fn ModularInverse2( a as NSInteger, b as NSInteger )
|
||||
a %= b
|
||||
for NSInteger x = 1 to b - 1
|
||||
if ( (a * x) % b == 1 ) then return x
|
||||
next
|
||||
end fn = -1
|
||||
|
||||
print fn ModularInverse2( 42, 2017 )
|
||||
|
||||
HandleEvents
|
||||
Loading…
Add table
Add a link
Reference in a new issue