|
Download benchmarks/Algorithms/euler_theorem_inverse/problem.md from PV-SJTU/PV-Bench: direct link, hf CLI and curl.
- Browser
- Download file 556 Bytes
-
https://huggingface.co/datasets/PV-SJTU/PV-Bench/resolve/main/benchmarks/Algorithms/euler_theorem_inverse/problem.md
- Command line
-
hf download hf://datasets/PV-SJTU/PV-Bench/benchmarks/Algorithms/euler_theorem_inverse/problem.md
-
curl -L -o problem.md https://huggingface.co/datasets/PV-SJTU/PV-Bench/resolve/main/benchmarks/Algorithms/euler_theorem_inverse/problem.md
556 Bytes
Modular Inverse by Euler's Theorem
Description
For coprime positive integers value and modulus, compute the canonical multiplicative inverse of value modulo modulus using Euler's theorem.
Input
The function receives value and modulus.
Output
Return the unique integer $x$ in $[0,modulus)$ satisfying $value \cdot x \equiv 1 \pmod{modulus}$.
Constraints
- $0 < value < modulus$.
- $2 \le modulus \le 46341$.
- $\gcd(value,modulus)=1$.
Source
Classical number-theory problem reconstructed from the verified C artifact.