#include<iostream> #include<vector> #include<algorithm> #include<map> #include<set> #include<cmath> #include<climits> #include<sstream> #include<cstdio> #include<string.h> #include<unordered_map> using namespace std;
//不需要考虑两个数的大小关系 int gcd(int a,int b) { if(b==0) return a; return gcd(b,a%b); } int main() { int a,b; while(cin>>a>>b) { cout<<gcd(a,b)<<endl; } return 0; }