blob: 1aeb15f8a830afee18c630967b49a749aa76da99 (
plain) (
blame)
1
2
3
4
5
6
7
|
#!/usr/bin/env python3
enc = lambda n: ' '.join([str(i) for i in n // 255 * [255] + [n % 255]])
with open('2enc.inp') as fi, open('2enc.out', 'w') as fo:
for line in fi:
fo.write(' '.join([enc(int(n)) for n in line.split()]) + '\n')
|