$C$ $Looooops$
$Description$
求
$$
Cx + A \equiv B \pmod {2^k}
$$
$Solution$
化简本式:
$$
Cx + 2^{k}y = B - A
$$
所以:
$$
a = C, b = 2^k, c = B - A, d = gcd(a, b)
$$
代入求解即可。
$Code:$
1 |
|
And they have sloppið the þunga of myrkursins and said that, Gleðileg jól, Lin.
求
$$
Cx + A \equiv B \pmod {2^k}
$$
化简本式:
$$
Cx + 2^{k}y = B - A
$$
所以:
$$
a = C, b = 2^k, c = B - A, d = gcd(a, b)
$$
代入求解即可。
1 | #include<bits/stdc++.h> |