A New Change Problem

题目链接

/*
给定两个互质的数,a,b,求这两个数不能表示的数的最大值和个数。
最大值=a*b-a-b;
个数  =(a-1)*(b-1)/2;
*/
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
typedef long long  LL;
using namespace std;
int n,m;
int main ()
{
    while(~scanf("%d%d",&n,&m))
    {
        printf("%d %d
",n*m-n-m,(n-1)*(m-1)/2);
    }
    return 0;
}
想的太多,做的太少。
原文地址:https://www.cnblogs.com/pealicx/p/6115596.html