mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
18 lines
306 B
C++
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;
|
||
|
}
|