#include int main() { int n; std::scanf("%d", &n); for(int i = n; i--;) { int a, b; std::scanf("%d%d", &a, &b); std::printf("%d\n", (a + 1) * b); } }