#CCBCHBA0000100. Bảng cửu chương 1 đến n (Multiplication Table 1 to n)
Bảng cửu chương 1 đến n (Multiplication Table 1 to n)
Multiplication Table 1 to n
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given , print an -by- multiplication table. The element in 1-indexed row , column is . Separate numbers with one space and no trailing spaces.
Input
One line contains integer .
Output
Print lines: row contains .
Subtasks
-
Subtask 1 (20%): .
-
Subtask 2 (30%): .
-
Subtask 3 (50%): .
Examples
Example 1
Input:
3
Output:
1 2 3
2 4 6
3 6 9
Explanation:
The value in row i and column j is the product i*j. For this sample, the input is 3; the displayed rows follow these rules exactly.
Example 2
Input:
1
Output:
1
Explanation:
The value in row i and column j is the product i*j. For this sample, the input is 1; the displayed rows follow these rules exactly.