summaryrefslogtreecommitdiff
path: root/progs/a651.py
blob: e2c1852b7016043de668d758dacfec97d7b8613f (plain)
1
2
3
4
5
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