Triangle Quest 2 - Problem Solution in Python

Author: Al-mamun Sarkar Date: 2020-03-26 08:55:36

Triangle Quest 2 - Problem Solution in Python. The following shows how to solve the HackerRank Triangle Quest 2 Python Math problem.

Code:

for i in range(1,int(input())+1): 
    print(pow( ((pow(10,i)-1)//9), 2))

 

Test Input:

5

Test Output:

1
121
12321
1234321
123454321