Cod sursa(job #3335629)
| Utilizator | Data | 23 ianuarie 2026 09:02:30 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | py | Status | done |
| Runda | Arhiva de probleme | Marime | 0.24 kb |
import re
file = open('text.in')
with open('text.in', 'r') as fin:
text = fin.read()
words = re.findall(r"[a-zA-Z]+", text)
with open('text.out', 'w') as fout:
fout.write(str(sum(len(word) for word in words) // len(words)))
