Missing Pyramid

0

0 votes
Medium
Problem

You have to print a pattern of missing pyramid having n number of lines where n is taken as the input.

The input will contain an integer type number n, where n represents number of lines.

For each input, print the missing pyramid pattern.

Input:
The first line contains an Integer N, which is the number of terms which will be provided as input. This is followed by N consecutive Integers, with a space between each pair of integers. All of these are on one line, and they are in AP (other than the point where an integer is missing).
Output:
One Number which is the missing integer from the series.

Time Limit: 5
Memory Limit: 256
Source Limit:
Explanation

Example 1:-
n=2
Output:-
121
1  1



Example 2:-
n=3
Output:-
12321
12  21
1     1




Example 3:-
n=4
Output:-
1234321
123  321
12     21
1        1



Editor Image

?