PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#SCKTCUOIKI0009. In bảng nhân của một số (Multiplication Table)
Bài tập này chưa được xếp vào lộ trình.
Mục lục đề ⌄
Đang đọc
In bảng nhân của một số (Multiplication Table)
Multiplication Table
**Version: Phuoc Hung OJ Extended
Problem Statement
Given an integer from through , print its multiplication table for factors through . Each line must have the exact form n x i = t, where x is the lowercase letter x and . Use exactly one space between the components.
Input
The only line contains the integer .
Output
Print exactly lines in increasing order of from to . Line must have the form n x i = t, where .
Subtasks
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Examples
Input
4
Output
4 x 1 = 4
4 x 2 = 8
4 x 3 = 12
4 x 4 = 16
4 x 5 = 20
4 x 6 = 24
4 x 7 = 28
4 x 8 = 32
4 x 9 = 36
Explanation
With , multiplying by through gives . Print each factor pair and product in the required format on its own line.
Liên quan
Trong các cuộc thi sau: