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