Window
"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;
}
上一篇: JavaScript高级程序设计第三版-读书笔记3
下一篇: Struts2.0错误
推荐阅读
-
JQ中$(window).load和$(document).ready区别与执行顺序
-
window下mysql 8.0.15 winx64安装配置方法图文教程
-
window.top[_CACHE]实现多个jsp页面共享一个js对象
-
js下parent.window与top.window的用法
-
一种在父窗口中得知window.open()出的子窗口关闭事件的方法
-
js/jq仿window文件夹移动/剪切/复制等操作代码
-
Android 开发艺术探索之Window和WindowManager解析
-
阿里云完美教程 Window2003 iis+mysql+php+zend环境配置
-
联想ThinkPad E430安装window XP系统后独立显卡无法启用驱动安装失效情况如何解决
-
记录Window系统下myeclipes连接linux下mysql所出现的一个bug