import sys

n = int(sys.stdin.readline())

print(f"{n:09d}")

f"{n:09d}"使用f-string格式化:

  • 09表示总宽度为9,不足部分用0填充
  • d表示十进制整数