mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
18 lines
310 B
C
18 lines
310 B
C
#include<stdio.h>
|
|
#include<stdlib.h>
|
|
|
|
int fafafa(long a,long b){
|
|
if(a%b == 0) return b;
|
|
return fafafa(b, a%b);
|
|
}
|
|
|
|
int main(void){
|
|
long i,j;
|
|
//i = 100; j = 10;
|
|
scanf("%ld%ld",&i,&j);
|
|
if(i<j){long t = i; i = j;j = t;}
|
|
printf("%ld",fafafa(j,i));
|
|
//system("PAUSE");
|
|
return 0;
|
|
}
|