~/algor $ cat problems/matritsa-karra-jadvali
Multiplication table
Easy
1000 ms
128 MB
20%
Two positive integers $n$ and $m$ are given. Build and print the $n \times m$ multiplication table matrix: the element in row $i$ and column $j$ (counting from $1$) is
$$a_{i,j} = i * j$$
Input
One line with two positive integers: $n$ and $m$.
Output
$n$ lines with $m$ space-separated integers each.
Note
$1 \le n, m \le 200$
Examples
Input #1
3 4
Output #1
1 2 3 4 2 4 6 8 3 6 9 12
Input #2
1 1
Output #2
1