You are viewing a single comment's thread. Return to all comments →
Multiply current number to 1, 11, 111 etc. 10**3 = 1000. 1000 // 9 = 111 (the floor value). 111 * 3 = 333.
for num in range(1, int(input())): print((10**num//9)*num)
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 →
Multiply current number to 1, 11, 111 etc. 10**3 = 1000. 1000 // 9 = 111 (the floor value). 111 * 3 = 333.