P14506 [GeeksforGeeks] Print the pattern1025
普及-
题目描述

Write a program that receives a number n as input and prints it in the following format as shown below.
Like for n = 2 the pattern will be:
1256
--3
4
Example 1:
Input: n = 3
Output:
123101112
--4
589
----6*7
Explaination: If the pattern shown in question
is followed, this will be the output.
Your Task:
You do not need to read input or print anything. Your task is to complete the function pattern() which takes n as input parameter and returns a list of string where each string denotes a new line of the pattern.
Expected Time Complexity: O(n^{2})
Expected Auxiliary Space: O(n^{2})
Constraints:
1 ≤ n ≤ 70

输入格式

见题面

输出格式

见题面

样例输入
n = 3
样例输出
1*2*3*10*11*12 --4*5*8*9 ----6*7