Cod sursa(job #2278832)
Utilizator | Data | 8 noiembrie 2018 16:49:51 | |
---|---|---|---|
Problema | Text | Scor | 80 |
Compilator | py | Status | done |
Runda | Arhiva de probleme | Marime | 0.25 kb |
with open("text.in") as f:
text = f.read()
import re
text = re.split(r'[\W]\s*', text)
cuv = len(text)
l = 0
for i in text:
if i == '':
cuv -= 1
l += len(i)
with open("text.out", 'w') as g:
g.write(str(l // cuv))