#include <bits/stdc++.h>using namespace std;signed main(){ int t; cin >> t; while(t--){ int x, y; cin >> x >> y; cout << 1LL * x * y - y + 1 << endl; } }
5 2 3 2 2 1 3 514 114 1000000000 1000000000
4 3 1 58483 999999999000000001
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!