Hey guys , python3.8 has some exciting updates . Among them , we can directly calculate (a^-1) %m by using pow function . The arguments to the function are pow(a , -1, m)
Output
The time complexity of this function is Log(modvalue)