标签:bsp color return col class lcm style turn gcd
int lcm(int a, int b) { return a / gcd(a, b) * b; } int gcd(int a,int b) { return b ? gcd(b,a%b):a; }
int exgcd(int a,int b,int &x,int &y) { if(!b) { x=1; y=0; return a; } int r=exgcd(b,a%b,x,y); int t=y; y=x-(a/b)*y; x=t; return r; //gcd }
标签:bsp color return col class lcm style turn gcd
原文地址:https://www.cnblogs.com/wronin/p/11422377.html