0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-08 15:18:46 +00:00
Baoshuo Ren 2021-08-19 17:11:13 +08:00 committed by Baoshuo Ren
parent d71d5e8ad8
commit 4bc93bb684
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

18
AcWing/872/872.cpp Normal file
View File

@ -0,0 +1,18 @@
#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
if (!b) return a;
return gcd(b, a % b);
}
int main() {
int n, a, b;
cin >> n;
while (n--) {
cin >> a >> b;
cout << gcd(a, b) << endl;
}
return 0;
}