#499. NOIP2009TG-23

NOIP2009TG-23

  1. (阅读程序写结果)
#include <iostream>
using namespace std;

int a,b;

int work(int a,int b){
  if (a%b)
    return work(b,a%b);
  return b;
}

int main(){
  cin >> a >> b;
  cout << work(a,b) << endl;
  return 0;
}

输入:123 321

输出:{{ input(1) }}