#CCBCHBA0000095. Logical Sequence
Logical Sequence
Logical Sequence
Source: beecrowd
Version: Phuoc Hung OJ Extended
Problem Statement
Given integer , for every from 1 to print two consecutive lines: , , , then , , . Separate three numbers with one space, print all digits in ordinary decimal notation.
Input
One line contains integer .
Output
Print exactly lines, keeping the two lines for each adjacent.
Subtasks
-
Subtask 1 (20%): .
-
Subtask 2 (30%): .
-
Subtask 3 (50%): .
Examples
Example 1
Input:
3
Output:
1 1 1
1 2 2
2 4 8
2 5 9
3 9 27
3 10 28
Explanation:
For every i, the first line uses the square and cube; the second increases those two values by 1. For this sample, the input is 3; the displayed rows follow these rules exactly.
Example 2
Input:
2
Output:
1 1 1
1 2 2
2 4 8
2 5 9
Explanation:
For every i, the first line uses the square and cube; the second increases those two values by 1. For this sample, the input is 2; the displayed rows follow these rules exactly.