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