mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 11:37:35 +00:00
15 lines
282 B
Text
15 lines
282 B
Text
|
#!/bin/sh
|
||
|
exec python.com -c "
|
||
|
import sys
|
||
|
from math import *
|
||
|
s = str(oct($*).replace('o',''))
|
||
|
if len(s) > 1: s = s[1:]
|
||
|
b = s.replace('L', '')
|
||
|
n = len(b)
|
||
|
if n <= 3: n = 3
|
||
|
elif n <= 6: n = 6
|
||
|
elif n <= 11: n = 11
|
||
|
elif n <= 22: n = 22
|
||
|
sys.stdout.write(('0%%0%dd' % n) % int(b))
|
||
|
"
|