G.W. Coding Contest 3 P2: A times B

Vincent has been struggling on a problem recently, where he writes a program to take two numbers as input and multiply them together. Given two numbers, A and B, can you output their product?

{\(-2^{31}\) \(\leq\) \(A\), \(B\) \(\leq\) \(2^{31}\)}


TIME CONSTRAINT: 1s

Sample Input 1:

3 7

Sample Output 1:

21
Explanation for Sample Input 1:
3 times 7 = 21.


Sample Input 2:

2147483648 2147483648

Sample Output 2:

4611686018427387904
Explanation for Sample Input 2:
2147483648 times 2147483648 = 4611686018427387904.

Submit Solution

Problem author: Vincent