#include <stdlib.h>
#include <stdio.h>
int GCD(int left, int right);
int main(void)
{
unsigned int max = 0;
unsigned int min = 0;
// printf("input:");
while(scanf("%d%d",&max,&min)==2)
printf("%d",GCD(max,min));
return 0;
}
int GCD(unsigned int left,unsigned int right)
{
unsigned int temp = 0;
if (left<right)
{
temp = left;
left = right;
right = temp;
}
if((left%right) ==0)
{
return right;
}
GCD(right,(left%right));
}
為什麼不行...