OJ-Problems-Source/HDOJ/2662_autoAC.cpp
2016-08-24 18:19:33 +08:00

18 lines
306 B
C++

#include <iostream>
using namespace std;
typedef unsigned long long int longint;
int main()
{
int t;
cin >> t;
while (t--)
{
longint n, m;
cin >> n >> m;
longint ans;
ans = (n * m) - n - m;
cout << ans << endl;
}
return 0;
}