Skip to main content
Rollback to Revision 2
Source Link
xenia
  • 8.2k
  • 2
  • 29
  • 59

Python 2, 58 5558 bytes

f=lambda n:"!"[:n]and(n>15and f(n/16)or"")+"HBKD"[n/4%4]+"OAEI"[n%4]

Saved 3 bytes thanks to Sp3000!

A recursive solution. Try it on Ideone.

Python 2, 58 55 bytes

f=lambda n:"!"[:n]and f(n/16)+"HBKD"[n/4%4]+"OAEI"[n%4]

Saved 3 bytes thanks to Sp3000!

A recursive solution. Try it on Ideone.

Python 2, 58 bytes

f=lambda n:(n>15and f(n/16)or"")+"HBKD"[n/4%4]+"OAEI"[n%4]

A recursive solution. Try it on Ideone.

added 98 characters in body
Source Link
xenia
  • 8.2k
  • 2
  • 29
  • 59

Python 2, 5858 55 bytes

f=lambda n:(n>15and"!"[:n]and f(n/16)or"")+"HBKD"[n/4%4]+"OAEI"[n%4]

Saved 3 bytes thanks to Sp3000!

A recursive solution. Try it on Ideone.

Python 2, 58 bytes

f=lambda n:(n>15and f(n/16)or"")+"HBKD"[n/4%4]+"OAEI"[n%4]

A recursive solution. Try it on Ideone.

Python 2, 58 55 bytes

f=lambda n:"!"[:n]and f(n/16)+"HBKD"[n/4%4]+"OAEI"[n%4]

Saved 3 bytes thanks to Sp3000!

A recursive solution. Try it on Ideone.

added 6 characters in body
Source Link
xenia
  • 8.2k
  • 2
  • 29
  • 59

Python 2, 58 bytes

f=lambda n:(n>15and f(n/16)or"")+"HBKD"[n/4%4]+"OAEI"[n%4]

A recursive solution. Try it on Ideone.

Python 2, 58

f=lambda n:(n>15and f(n/16)or"")+"HBKD"[n/4%4]+"OAEI"[n%4]

A recursive solution. Try it on Ideone.

Python 2, 58 bytes

f=lambda n:(n>15and f(n/16)or"")+"HBKD"[n/4%4]+"OAEI"[n%4]

A recursive solution. Try it on Ideone.

Source Link
xenia
  • 8.2k
  • 2
  • 29
  • 59
Loading