结论:
如果 a,b 均是正整数且互质,那么由 ax+by,x≥0,y≥0 不能凑出的最大数是 ab−a−b。
证明:
https://www.cnblogs.com/Yuzao/p/7074465.html
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long LL;
int main()
{
LL a, b;
cin >> a >> b;
cout << a * b - a - b << endl;
return 0;
}