blob: 957923744101634ae80950e9eb48b520a4146674 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/usr/bin/env python3
def main() -> None:
with open("input", "r", encoding="utf-8") as f:
print(
sum(
map(
lambda l: sum(map(lambda s: len(s) in (2, 3, 4, 7), l)),
map(lambda l: l.split("|")[1].strip().split(), f.readlines()),
)
)
)
if __name__ == "__main__":
main()
|