bibi_binaire.py

Created by nicolas-patrois

Created on February 17, 2019

165 Bytes

Count in bibi-binary like Boby Lapointe.


def bibibinaire(n):
  s=""
  while n:
    n,r=divmod(n,4)
    s="OAEI"[r]+s
    n,r=divmod(n,4)
    s="HBKD"[r]+s
  if s:
    return s
  return s