~/algor $ cat problems/for/multiplication-table-of-a-number
Multiplication table of a number
Easy
1000 ms
64 MB
21%
An integer is given. Print its multiplication table from to : for , on a separate line, , and their product .
Input
One integer .
Output
lines. Line has the form n * i = result: , the sign *, , the sign = and the product , all separated by single spaces (for example, 3 * 1 = 3). A negative number is written with a minus sign (for example, -4 * 1 = -4).
Note
Examples
Input #1
3
Output #1
3 * 1 = 3 3 * 2 = 6 3 * 3 = 9 3 * 4 = 12 3 * 5 = 15 3 * 6 = 18 3 * 7 = 21 3 * 8 = 24 3 * 9 = 27 3 * 10 = 30
Input #2
-4
Output #2
-4 * 1 = -4 -4 * 2 = -8 -4 * 3 = -12 -4 * 4 = -16 -4 * 5 = -20 -4 * 6 = -24 -4 * 7 = -28 -4 * 8 = -32 -4 * 9 = -36 -4 * 10 = -40