Cod sursa(job #2388860)
Utilizator | Data | 26 martie 2019 16:50:00 | |
---|---|---|---|
Problema | Text | Scor | 90 |
Compilator | py | Status | done |
Runda | Arhiva de probleme | Marime | 0.27 kb |
#!/usr/bin/env python
import re
with open("text.in", "r") as file_in:
words = re.findall(r"([a-zA-Z]+)", file_in.read())
with open("text.out", "w") as file_out:
lungime_medie = len(''.join(words)) // len(words)
file_out.write(str(lungime_medie))