杭电oj,C语言,求大佬debug

#include<stdio.h>

int?gcd(int?a,int?b)

{int?r;

while(r=a%b)

{a=b;

b=r;

}

return?b;

}

int?main()

{?int?n,k,a,b;

while(scanf("%d",&n)==1)

{?scanf("%d",&a);

while(--n)

{?scanf("%d",&b);

a=a*b/gcd(a,b);

}

printf("%d\n",a);

}

return?0;

}