~/algor $ cat problems/for-kopaytirish-jadvali
Multiplication table
Medium
1000 ms
64 MB
47%
Positive integers $N$ and $M$ are given. Print a multiplication table with $N$ rows and $M$ columns: column $j$ of row $i$ holds the value $i * j$.
Input
One line with two positive integers: $N$ and $M$.
Output
$N$ lines, each with $M$ integers separated by spaces.
Note
$1 \le N, M \le 20$
Examples
Input #1
3 4
Output #1
1 2 3 4 2 4 6 8 3 6 9 12
Input #2
2 5
Output #2
1 2 3 4 5 2 4 6 8 10