Many Littles Make a Mickle
题号:NC229490
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Gather sand to form a tower is a Chinese idiom, whose Pinyin is . It means to pile sand into a pagoda, referring that a little makes a lot. From the fahua Sutra - convenience products.


Suppose the tower has N floors. There are rooms on the floor. Each room can accommodate M people. How many people can the N floor tower accommodate?

输入描述:

The first line is a positive integer , indicating that there are T test data.

Next, there are T lines. Each line has two positive integers N and , indicating the number of floors of the tower and the number of people that can be accommodated in each room in a test data.

输出描述:

Each test data outputs a line containing one positive integer, that is, the total number of people that can be accommodated in the N floor tower.
示例1

输入

复制
2
2 2
3 3

输出

复制
10
42