Files
python/TangDou/LanQiaoBei/LanQiaoBei13ShengSai_ZJ_I/BC3.cpp
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

14 lines
356 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include <bits/stdc++.h>
using namespace std;
// https://blog.csdn.net/gl620321/article/details/104907041/
/*
通过找规律可以得到,如果(p, q)=d=1(互质), 最大的凑不出来的数是a*b-a-b.
这个可以看作是一个定理
*/
int main() {
int a, b;
cin >> a >> b;
cout << a * b - a - b << endl;
return 0;
}