Finding the inverse element in a residue ring
📁 question
It is necessary to find an element B that is the inverse of element A modulo C.
Such that (A*B)%C = 1.
How to find B in general form?
Here is the code for downloading a published file. (Your link is not working for some reason, I inserted my own link as an example. Replace it with your working link when you have one)
import requestsfrom urllib.parse import urlencodebase_url = 'https://cloud-api.yandex.net/v1/disk/public/resources/download?'public_key = 'https://yadi.sk/d/UJ8VMK2Y6bJH7A' # Insert your link here# Get the download linkfinal_url = base_url + urlencode(dict(public_key=public_key))response = requests.get(final_url)download_url = response.json()['href'] Log in to leave an answer