0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-27 15:16:28 +00:00

P41237. 小凯的疑惑

https://loj.ac/s/1177607
This commit is contained in:
Baoshuo Ren 2021-07-09 15:44:45 +08:00 committed by Baoshuo Ren
parent c7fb5ad7c6
commit 53fdef7229
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

10
LibreOJ/P41237/P41237.cpp Normal file
View File

@ -0,0 +1,10 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << (a / __gcd(a, b) + b / __gcd(a, b) - 1) * __gcd(a, b) << endl;
return 0;
}