"Anas" is a good citizen lives in "Lateria". Lateria is a city full of naughty children, you can not sleep, eat nor relax! -poor Anas-. Anas is my friend and knows that I can get your help in solving problems so he asked me for this favor and I will not say no, here is Anas's problem: One of Lateria children broke Anas's rectangular window, Anas knew that naughty child and asked his parents to replace the broken window, and gave them the length and width of the broken window (X and Y in order), when the child's parent brought him the new one, he discovered that he told them the dimensions reversed Y X instead of X Y, what a bad luck! Now he asks you to tell him the area of the new window with the reversed dimensions!! eg: Anas will give you the dimensions X Y you should tell him the area formed by the rectangular window with dimensions Y X.
Input
the first line of input is an integer 0 < T < 100 then T lines, each line is a test case contains two integers 1 ≤ X,Y ≤ 100000 in order separated by a single space.
Output
for each test case, print one line contains a single integer represent the the rectangle area of dimensions Y and X.
Examples
Input
3 5 4 1 2 33 33
Output
20 2 1089
AC代码(水)
Select Code
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
long long x, y;
while(scanf("%d",&t)!=EOF)
{
while(t--)
{
scanf("%lld %lld",&x, &y);
printf("%lld\n",x*y);
}
}
return 0;
}