Skip to main content
4 of 4
Commonmark migration

Pyth, 22 19 bytes

3 bytes thanks to Jakube.

seSs.:RQ.n,L_MdCB.z

Try it online.

If we are allowed to print leading zeroes, the code is 18 bytes:

eSs.:RQ.n,L_MdCB.z
PurkkaKoodari
  • 17.9k
  • 2
  • 35
  • 91