aoc2015/d08/run.py

11 lines
236 B
Python
Raw Normal View History

import sys
R = T = N = 0
for l in sys.stdin.readlines():
l = l[:-1]
s = eval(l)
T += len(l)
R += len(s)
N += sum((2 if c in ['"', '\\'] else 1 for c in l), 2)
#print(len(l),l,len(s), s, nl)
print(T, R, T-R, N-T)