【题解】能量采集

又是一道可爱的数学题……

【题解】Common Divisors

数学题真是有趣,大胆猜想,无需证明……

欧几里得与扩展欧几里得定理

$$ \gcd(a,b) = \gcd (b,a \text{ mod } b) $$

$$ \begin{cases} ax_1 + by_1 = \gcd(a,b) \newline bx_2 + (a\text{ mod }b)y_2 = \gcd(b,a\text{ mod }b) \end{cases} \Rightarrow \begin{cases} x_1 = y_2 \newline y_1 = x_2- \lfloor\dfrac{a}{b}\rfloor \times y_2 \end{cases}$$

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×