Mod Inverse


Submit solution

Points: 50
Time limit: 1.0s
Memory limit: 125M

Author:
Problem types

Cho hai số xm, tìm số y nhỏ nhất để xy chia m dư 1.

Dữ liệu vào:

  • Gồm hai số xm.

Ràng buộc

  • Các số đều trong khoảng 1 đến 1000.

Kết quả:

  • In ra số y, nếu không tồn tại số y thì in ra "No exist".

Ví dụ 1:

Nhập vào

Copy
4
17

OUTPUT

Copy
13

Comments

There are no comments at the moment.