Triangle Quest 2:
You are given a positive integer .
Your task is to print a palindromic triangle of size .
For example, a palindromic triangle of size is:
1
121
12321
1234321
123454321
You can't take more than two lines. The first line (a for-statement) is already written for you.
You have to complete the code using exactly one print statement.
Note:
Using anything related to strings will give a score of .
Using more than one for-statement will give a score of .
Input Format
A single line of input containing the integer .
Constraints
Output Format
Print the palindromic triangle of size as explained above.
Sample Input
5
![Triangle Quest 2 || Hackerrank Solution](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcM8DsVtTnmI_quTUyxllcj2KflkRv7JY_wH4cexi-j-opf0ybBoNTM33Pi5qbVVG1qkv7pjy-V2BUi2nkyUCfuEK2o-q0k_MtrVO6sNeil8Unxl_IYQSnGaEHj66J3CFlbW-UlMRoIwE/s72-w200-c-h100/q141s3xfs.png)
No comments: