19 lines
360 B
Plaintext
19 lines
360 B
Plaintext
|
#!/usr/bin/python3
|
||
|
|
||
|
import sys
|
||
|
import re
|
||
|
|
||
|
for line in sys.stdin.readlines():
|
||
|
answer = re.findall('([\W]|^)[a-ząćęłńóśźż][\w]*',line)
|
||
|
temp = ''
|
||
|
if answer:
|
||
|
temp += (str(len(answer))+" ")
|
||
|
else:
|
||
|
temp += "0 "
|
||
|
answer = re.findall('([\W]|^)[A-ZĄĆĘŁŃÓŚŹŻ][\w]*',line)
|
||
|
if answer:
|
||
|
temp += str(len(answer))
|
||
|
else:
|
||
|
temp += "0"
|
||
|
print(temp)
|