*
* Copyright (c) 2014,烟台大学计算机学院
* All rights reserved.
*文件名称: test.cop
*作者:翟兴雷
*完成日期:2014年11月13日
*版本号:v1.0
*
*问题描述
*输入描述:
*程序输出:
*/
#include <iostream>
using namespace std;
int gcd(int a,int b);
int main()
{
int a,b;
cin>>a>>b;
cout<<gcd(a,b)<<endl;
return 0;
}
int gcd(int a,int b)
{
int g;
if(b==0)
g=a;
else g=gcd(b,a%b);
return g;
}