#P1082. [NOIP 2012 提高组] 同余方程
[NOIP 2012 提高组] 同余方程
Description
Find the smallest positive integer solution of to the congruence equation .
Input Format
One line containing two integers , separated by a single space.
Output Format
A single integer , which is the smallest positive solution. The input is guaranteed to have a solution.
3 10
7
Hint
Constraints
- For of the testdata, .
- For of the testdata, .
- For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号