You are viewing a single comment's thread. Return to all comments →
I didn't figure out the math but found a way of using the walruss operator:
for i in range(1,int(input())): print( i * (prev := (1 if i == 1 else prev + pow(10, i - 1) ) ) )
Seems like cookies are disabled on this browser, please enable them to open this website
Triangle Quest
You are viewing a single comment's thread. Return to all comments →
I didn't figure out the math but found a way of using the walruss operator: