Jerry Smith is Rick’s Son-in-Law and Morty’s father. He recently moved out to a different neighborhood. Unfortunately Jerry is not very Smart or Bright. The new neighborhood is full of annoying children, Jerry is not able to sleep, eat, relax or find a moment of peace! One day, some children were playing outside and they broke Jerry’s rectangular window. Jerry was furious and he decided to ask the children’s parents to replace the broken window. He gave them the length X and width Y of the broken window. Unfortunately, when the child’s parents brought him the new one, he discovered that he told them the dimensions in the wrong order. He gave them the dimensions as Y, X instead of X, Y. Needless to say, Jerry tends to do stupid things somtimes! Now Jerry needs your help in figuring out the area of the new window with the reversed dimensions so he can put it to good use instead of wasting it. Can you help him with that? Note that you will be given the dimensions as X, Y, your task is figuring the area formed by the rectangular window with dimensions Y, X.
Input
Your input will start with (1 ≤ T ≤ 100), number of test cases. Then T test cases follow. Each test case consists of a single line that contains two space separated integers X and Y (1 ≤ X, Y ≤ 105).
Output
For each test case you will print a single integer, the area of the rectangle with the dimensions Y and X.
Examples
Input
3
5 4
1 2
33 33
Output
20
2
1089
题目好像涉及文件流的输入,但是我不懂呀
代码问的…
#include <bits/stdc++.h>
using namespace std;
int main()
{
freopen("window.in","r",stdin);
int x,y,t;
long long int sum;
scanf("%d",&t);
while(t--){
scanf("%d %d",&x,&y);
sum=(long long int)x*y;
printf("%lld\n",sum);
}
return 0;
}