Hide

Problem C
Fancy Multiplication

Accepted submissions to this problem will be granted a score of 100

Let us assume that there is no multiplication operator.

Write a program that implements multiplication by using addition and a loop.

Input

Input consists of two lines.
The first line contains the first integer x, where 0x106.
The second line contains the second integer y, where 0y106.

Output

Output consists of one line, containing the result of the multiplication of x and y.

Sample Input 1 Sample Output 1
3
4
12
Sample Input 2 Sample Output 2
3
0
0
Sample Input 3 Sample Output 3
8
7
56
Sample Input 4 Sample Output 4
100
100
10000
Sample Input 5 Sample Output 5
5
5
25
Hide

Please log in to submit a solution to this problem

Log in