#K63107. Molecular Doubling in a Test Tube

    ID: 31680 Type: Default 1000ms 256MiB

Molecular Doubling in a Test Tube

Molecular Doubling in a Test Tube

In this problem, you are given an initial number of molecules M in a test tube. Every second, each molecule doubles, meaning that the total number of molecules is multiplied by 2.

Your task is to compute the number of molecules after S seconds. The relation is given by the formula: \(f(M,S)=M\times2^S\).

inputFormat

The first line of input contains an integer T, representing the number of test cases. Each of the following T lines contains two space-separated integers M and S, where M is the initial number of molecules and S is the number of seconds.

outputFormat

For each test case, print the number of molecules after S seconds on a new line.## sample

3
2 3
4 2
1 5
16

16 32

</p>