摘要:
x+km≡y+kn(modl) x+km−(y+kn)=lz,z∈Z x−y+k(m−n)−lz=0 k(m-n)-lz=-(x-y) 设S=x-y,W=n-m kW+lz=S(exgcd,求k) //我的代码 #include<iostream>#define ll long long using 阅读全文
摘要:
实质是 ax + by = 1; gcd(a,b)=gcd(b,a mod b) 欧几里得算法; //我的代码 #include <iostream> using namespace std;long long a,b,x,y,k;void exgcd(long long a,long long b 阅读全文