fork download
  1. n = int(input("숫자를 입력하세요: "))
  2. num = [0] * 10
  3.  
  4. result = [0] * 10
  5. for i in range(1, 10):
  6. for j in range(len(str(n))):
  7. if int(str(n)[j]) >= i:
  8. result[j] += 1
  9. result[j] += 10**j
  10.  
  11. print(result)
  12.  
Success #stdin #stdout 0.04s 9820KB
stdin
11
stdout
숫자를 입력하세요: [2, 11, 0, 0, 0, 0, 0, 0, 0, 0]