djfz-2023-s464933/TaskF03/run.py
2024-01-07 21:21:03 +01:00

14 lines
316 B
Python

import re
import sys
startLowerPattern = r'\b[a-ząćęłńóśźż]\w*\b'
startUpperPattern = r'\b[A-ZĄĆĘŁŃÓŚŹŻ]\w*\b'
for line in sys.stdin:
line = line.strip()
lower = re.findall(startLowerPattern, line)
upper = re.findall(startUpperPattern, line)
print(f"{len(lower)} {len(upper)}")