Triangle Quest - Python math solution. The following shows how to solve the HackerRank Triangle Quest Python Math problem.
Code:
for i in range(1,int(input())):
print( ((pow(10, i)-1)//9) * i )
Test Input:
5
Test Output:
1
22
333
4444