zadanie #2
This commit is contained in:
parent
eb54af526f
commit
1b89be1bb4
0
TaskB01/Makefile
Normal file
0
TaskB01/Makefile
Normal file
11
TaskB01/run
Executable file
11
TaskB01/run
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
for input in sys.stdin.readlines():
|
||||
answer = re.search('.*Hamlet.*',input);
|
||||
if answer:
|
||||
print(answer.group())
|
||||
else:
|
||||
pass
|
0
TaskB02/Makefile
Normal file
0
TaskB02/Makefile
Normal file
11
TaskB02/run
Executable file
11
TaskB02/run
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
for input in sys.stdin.readlines():
|
||||
answer = re.search('( |^)(P|p)ies( |$)',input);
|
||||
if answer:
|
||||
print(input[:-1])
|
||||
else:
|
||||
pass
|
0
TaskB03/Makefile
Normal file
0
TaskB03/Makefile
Normal file
11
TaskB03/run
Executable file
11
TaskB03/run
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
for input in sys.stdin.readlines():
|
||||
answer = re.search('19\d{2} r\.',input);
|
||||
if answer:
|
||||
print(input[:-1])
|
||||
else:
|
||||
pass
|
0
TaskB04/Makefile
Normal file
0
TaskB04/Makefile
Normal file
14
TaskB04/run
Executable file
14
TaskB04/run
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
for input in sys.stdin.readlines():
|
||||
answer = re.findall('\d+',input);
|
||||
if answer:
|
||||
z = ""
|
||||
for x in range(0, len(answer)):
|
||||
z=z+str(answer[x])+" "
|
||||
print(z[:-1])
|
||||
else:
|
||||
pass
|
0
TaskC09/Makefile
Normal file
0
TaskC09/Makefile
Normal file
11
TaskC09/run
Executable file
11
TaskC09/run
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
for input in sys.stdin.readlines():
|
||||
answer = re.search('[A-Z]\d{2}',input);
|
||||
if answer:
|
||||
print("yes")
|
||||
else:
|
||||
print("no")
|
0
TaskC33/Makefile
Normal file
0
TaskC33/Makefile
Normal file
11
TaskC33/run
Executable file
11
TaskC33/run
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
for input in sys.stdin.readlines():
|
||||
answer = re.search('^([AGCT]+|[AGCU]+)$',input);
|
||||
if answer:
|
||||
print("yes")
|
||||
else:
|
||||
print("no")
|
0
TaskC39/Makefile
Normal file
0
TaskC39/Makefile
Normal file
11
TaskC39/run
Executable file
11
TaskC39/run
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
for input in sys.stdin.readlines():
|
||||
answer = re.search('^([1-9]{6}|0[1-9]{5}|[1-9]{1}0[1-9]{4}|[1-9]{2}0[1-9]{3}|[1-9]{3}0[1-9]{2}|[1-9]{4}0[1-9]{1}|[1-9]{5}0)$',input);
|
||||
if answer:
|
||||
print("yes")
|
||||
else:
|
||||
print("no")
|
0
TaskC44/Makefile
Normal file
0
TaskC44/Makefile
Normal file
15
TaskC44/run
Executable file
15
TaskC44/run
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
for input in sys.stdin.readlines():
|
||||
answer = re.search('^[A-ZĆŁŚŹŻ][a-ząćłśźż]*a [A-ZĆŁŚŹŻ][a-ząćłśźż]+$',input);
|
||||
if answer:
|
||||
answer2 = re.search("^(Kosma|Jarema)", answer.group());
|
||||
if answer2:
|
||||
print("<NONE>")
|
||||
else:
|
||||
print(answer.group().split(" ")[1])
|
||||
else:
|
||||
print("<NONE>")
|
Loading…
Reference in New Issue
Block a user