SGU 102 – GCD

 
/* The simplest GCD function.
 * but not eGCD.
 * Need to change to LL sometimes
 */
int gcd(int a, int b)
{
	return b?gcd(b,a%b):a;
}

Leave a Reply

Your email address will not be published.