Problem E. Description has only two Sentences
时间限制 1000 ms
内存限制 32 MB
a
n = X*a
n-1 + Y and Y mod (X-1) = 0.
Your task is to calculate the smallest positive integer k that a
k mod a
0 = 0.
输入数据
输出数据
For each case, output the answer in one line, if there is no such k, output "Impossible!".
样例输入
样例输出
$ Mathjax font initiator $