do2
This commit is contained in:
parent
74270b7f6b
commit
d2df7eb2f2
0
TaskD02/Makefile
Normal file
0
TaskD02/Makefile
Normal file
2
TaskD02/run
Normal file
2
TaskD02/run
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
python TaskD02/run.py "$@"
|
11
TaskD02/run.py
Normal file
11
TaskD02/run.py
Normal file
@ -0,0 +1,11 @@
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
for line in sys.stdin:
|
||||
A = len(re.findall(r'[a-ząćęłńóśźż]', line))
|
||||
B = len(re.findall(r'[A-ZĄĆĘŁŃÓŚŹŻ]', line))
|
||||
C = len(re.findall(r'\d', line))
|
||||
line = line.rstrip('\n')
|
||||
D = len(line) - A - B - C
|
||||
sys.stdout.write(f"{A} {B} {C} {D}\n")
|
Loading…
Reference in New Issue
Block a user