'commit'
This commit is contained in:
15
TangDou/XiTi/1174.cpp
Normal file
15
TangDou/XiTi/1174.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int gcd(int a, int b) {
|
||||
if (b == 0) return a;
|
||||
else return gcd(b, a % b);
|
||||
}
|
||||
|
||||
int main() {
|
||||
int a, b;
|
||||
cin >> a >> b;
|
||||
cout << gcd(a, b) << endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user