|
Download benchmarks/Algorithms/modular_inverse/problem.md from PV-SJTU/PV-Bench: direct link, hf CLI and curl.
- Browser
- Download file 454 Bytes
-
https://huggingface.co/datasets/PV-SJTU/PV-Bench/resolve/main/benchmarks/Algorithms/modular_inverse/problem.md
- Command line
-
hf download hf://datasets/PV-SJTU/PV-Bench/benchmarks/Algorithms/modular_inverse/problem.md
-
curl -L -o problem.md https://huggingface.co/datasets/PV-SJTU/PV-Bench/resolve/main/benchmarks/Algorithms/modular_inverse/problem.md
454 Bytes
| # Modular Multiplicative Inverse | |
| ## Description | |
| Given coprime positive integers $a$ and $m$, compute the canonical multiplicative inverse of $a$ modulo $m$. | |
| ## Input | |
| The function receives $a$ and modulus $m$. | |
| ## Output | |
| Return the unique $x$ in $[0,m)$ such that $ax \equiv 1 \pmod m$. | |
| ## Constraints | |
| - $1 < m$. | |
| - $0 < a < m$. | |
| - $\gcd(a,m)=1$. | |
| ## Source | |
| Classical extended-Euclidean-algorithm problem reconstructed from the verified C artifact. | |