kom
This commit is contained in:
parent
941660f05e
commit
dfc535fb59
BIN
TaskA00/.run.swp
BIN
TaskA00/.run.swp
Binary file not shown.
0
TaskA13/Makefile
Normal file
0
TaskA13/Makefile
Normal file
36
TaskA13/run
Normal file
36
TaskA13/run
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
|
alph_num_dict = {
|
||||||
|
'a': '2', 'b': '2', 'c': '2',
|
||||||
|
'd': '3', 'e': '3', 'f': '3',
|
||||||
|
'g': '4', 'h': '4', 'i': '4',
|
||||||
|
'j': '5', 'k': '5', 'l': '5',
|
||||||
|
'm': '6', 'n': '6', 'o': '6',
|
||||||
|
'p': '7', 'q': '7', 'r': '7',
|
||||||
|
's': '7',
|
||||||
|
'u': '8', 'w': '9', 'v': '8',
|
||||||
|
'w': '9', 'x': '9', 'y': '9',
|
||||||
|
'z': '9', ' ': ' '
|
||||||
|
}
|
||||||
|
|
||||||
|
def translate(text):
|
||||||
|
response = ""
|
||||||
|
for i in text.lower():
|
||||||
|
response += alph_num_dict[i]
|
||||||
|
return response
|
||||||
|
|
||||||
|
def is_number(text):
|
||||||
|
pattern = re.compile(r'^[A-Z]{5} [A-Z]{4}$')
|
||||||
|
|
||||||
|
result = re.match(pattern, text)
|
||||||
|
if result and translate(text)!=translate("HORSE HEAD"):
|
||||||
|
return "yes"
|
||||||
|
else:
|
||||||
|
return "no"
|
||||||
|
|
||||||
|
x = input()
|
||||||
|
while x:
|
||||||
|
print(is_number(x))
|
||||||
|
x = input()
|
0
TaskA23/Makefile
Normal file
0
TaskA23/Makefile
Normal file
17
TaskA23/run
Normal file
17
TaskA23/run
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
|
def is_number(test):
|
||||||
|
pattern = re.compile(r'^\-?\d*[05]$')
|
||||||
|
|
||||||
|
result = re.match(pattern, test)
|
||||||
|
if result:
|
||||||
|
return "yes"
|
||||||
|
else:
|
||||||
|
return "no"
|
||||||
|
|
||||||
|
x = input()
|
||||||
|
while x:
|
||||||
|
print(is_number(x))
|
||||||
|
x = input()
|
0
TaskA37/Makefile
Normal file
0
TaskA37/Makefile
Normal file
17
TaskA37/run
Normal file
17
TaskA37/run
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
|
def is_number(test):
|
||||||
|
pattern = re.compile(r'^\-?\d*[05]$')
|
||||||
|
|
||||||
|
result = re.match(pattern, test)
|
||||||
|
if result:
|
||||||
|
return "yes"
|
||||||
|
else:
|
||||||
|
return "no"
|
||||||
|
|
||||||
|
x = input()
|
||||||
|
while x:
|
||||||
|
print(is_number(x))
|
||||||
|
x = input()
|
0
TaskA42/Makefile
Normal file
0
TaskA42/Makefile
Normal file
17
TaskA42/run
Normal file
17
TaskA42/run
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
|
def is_number(test):
|
||||||
|
pattern = re.compile(r'^N(IE{6}|O{6})!{3}$')
|
||||||
|
|
||||||
|
result = re.match(pattern, test)
|
||||||
|
if result:
|
||||||
|
return "yes"
|
||||||
|
else:
|
||||||
|
return "no"
|
||||||
|
|
||||||
|
x = input()
|
||||||
|
while x:
|
||||||
|
print(is_number(x))
|
||||||
|
x = input()
|
0
TaskA44/Makefile
Normal file
0
TaskA44/Makefile
Normal file
17
TaskA44/run
Normal file
17
TaskA44/run
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
|
def is_number(test):
|
||||||
|
pattern = re.compile(r'^\-?\d*[05]$')
|
||||||
|
|
||||||
|
result = re.match(pattern, test)
|
||||||
|
if result:
|
||||||
|
return "yes"
|
||||||
|
else:
|
||||||
|
return "no"
|
||||||
|
|
||||||
|
x = input()
|
||||||
|
while x:
|
||||||
|
print(is_number(x))
|
||||||
|
x = input()
|
0
TaskA45/Makefile
Normal file
0
TaskA45/Makefile
Normal file
17
TaskA45/run
Normal file
17
TaskA45/run
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
|
def is_number(test):
|
||||||
|
pattern = re.compile(r'^([A-Za-ĆŁŚŹŻ]\w*[^a]|Kosma|Jarema) [A-Za-ĆŁŚŹŻ]\w*$')
|
||||||
|
|
||||||
|
result = re.match(pattern, test)
|
||||||
|
if result:
|
||||||
|
return "yes"
|
||||||
|
else:
|
||||||
|
return "no"
|
||||||
|
|
||||||
|
x = input()
|
||||||
|
while x:
|
||||||
|
print(is_number(x))
|
||||||
|
x = input()
|
@ -2,5 +2,6 @@ Print the sum of integers read from the standard input.
|
|||||||
Note: this is just an example of a task (and a solution).
|
Note: this is just an example of a task (and a solution).
|
||||||
The task has a solution already, do not solve it!
|
The task has a solution already, do not solve it!
|
||||||
|
|
||||||
POINTS: 1
|
POINTS: 3
|
||||||
DEADLINE: 2019-10-30 23:59
|
DEADLINE: 2019-10-30 23:59
|
||||||
|
|
||||||
|
@ -4,5 +4,5 @@ The task has a solution already, do not solve it!
|
|||||||
This is an example of a solution in a compilable langauge
|
This is an example of a solution in a compilable langauge
|
||||||
(Makefile is needed in which compilation process is described.)
|
(Makefile is needed in which compilation process is described.)
|
||||||
|
|
||||||
POINTS: 0
|
POINTS: 3
|
||||||
DEADLINE: 2019-10-30 23:59
|
DEADLINE: 2019-10-30 23:59
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
For each line read from the standard input print the number of characters
|
For each line read from the standard input print the number of characters
|
||||||
(not counting the end-of-line character), a space and the line read.
|
(not counting the end-of-line character), a space and the line read.
|
||||||
|
|
||||||
POINTS: 1
|
POINTS: 3
|
||||||
DEADLINE: 2019-10-30 23:59
|
DEADLINE: 2019-10-30 23:59
|
||||||
|
1
lista_zadań.txt
Normal file
1
lista_zadań.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
2: A00 A13 A42 A45
|
Loading…
Reference in New Issue
Block a user