skip day 7, needs an AST ; done day 8 ; draft day 9

This commit is contained in:
2023-12-01 18:13:17 +01:00
parent e127af3e0d
commit 69f4c3c8e7
2 changed files with 49 additions and 0 deletions

11
d08/run.py Normal file
View File

@@ -0,0 +1,11 @@
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)