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
The second line contains the second integer
Output
Output consists of one line, containing the result of the
multiplication of
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 |