@@ -0,0 +1,689 @@
+# coding: utf-8%0Aimport sys%0A%0A%0Adef bin_str(code):%0A    return bin(code)%5B2:%5D%0A%0A%0Adef unary(x):%0A    return (bin_str(1), x)%0A%0A%0Adef gamma(x):%0A    bx = bin_str(x)%0A    return (bx, 2 * len(bx) - 1)%0A%0A%0Adef delta(x):%0A    bx_len = len(bin_str(x))%0A    (c, b) = gamma(bx_len)%0A    return (%0A        bin_str(x + ((int(c, 2) - 1) %3C%3C (bx_len - 1))),%0A        bx_len - 1 + b,%0A    )%0A%0A%0Adef code_str(code):%0A    return '%7B:0%3E%7Bfill%7D%7D'.format(code%5B0%5D, fill=code%5B1%5D)%0A%0A%0Afor line in sys.stdin:%0A    print('Unary Code: %7B%7D'.format(%0A        code_str(unary(int(line)))%0A    ))%0A    print('Gamma Code: %7B%7D'.format(%0A        code_str(gamma(int(line)))%0A    ))%0A    print('Delta Code: %7B%7D'.format(%0A        code_str(delta(int(line)))%0A    ))%0A

add script to get integer codes.