diff options
Diffstat (limited to 'progs/a651.py')
-rw-r--r-- | progs/a651.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/progs/a651.py b/progs/a651.py new file mode 100644 index 0000000..e2c1852 --- /dev/null +++ b/progs/a651.py @@ -0,0 +1,6 @@ +def modular_inverse(arr, N, P):
+ current_element = 0
+ for i in range(0, N):
+ if ((arr[i] * arr[i]) % P == 1):
+ current_element = current_element + 1
+ return current_element
\ No newline at end of file |