You are viewing a single comment's thread. Return to all comments →
import math if name == 'main': n = int(input()) a = 0 m = 10**n for i in range(1, n+1): m = math.floor(math.log10(i))+1 m = 10**m a = a*m + i print(a)
Seems like cookies are disabled on this browser, please enable them to open this website
Print Function
You are viewing a single comment's thread. Return to all comments →
import math if name == 'main': n = int(input()) a = 0 m = 10**n for i in range(1, n+1): m = math.floor(math.log10(i))+1 m = 10**m a = a*m + i print(a)