Generate a $ N \times N $ multiplication table.
Input
The only line of input contains an integer $ N $.
Output
Output $ N $ lines of $ N $ integers separated by spaces. The $ j $th integer on the $ i $th line is $ i \times j $.
Constraints
Subtask 1 (30%): $ 1 \le N \le 10 $
Subtask 2 (70%): $ 1 \le N \le 1000 $
Sample Test Cases
Input | Output | |
---|---|---|
7 | 1 2 3 4 5 6 7 2 4 6 8 10 12 14 3 6 9 12 15 18 21 4 8 12 16 20 24 28 5 10 15 20 25 30 35 6 12 18 24 30 36 42 7 14 21 28 35 42 49 |
Scoring: Per Subtask
Authored by s16f22
Appeared in Test Contest 2.5