Compare commits
10 Commits
afd599225c
...
fe915f67c3
Author | SHA1 | Date |
---|---|---|
Wojtek | fe915f67c3 | |
Wojtek | 53d4a43e16 | |
Jacek Kałużny | dc0392f7d6 | |
Jacek Kałużny | ae508b36b1 | |
Jacek Kałużny | cd6b06cefa | |
Jacek Kałużny | c818e6742f | |
Jacek Kałużny | 6b53fddd75 | |
Jacek Kałużny | 8fb54512d7 | |
Jacek Kałużny | 2a11de62de | |
Jacek Kałużny | f0b3128a5d |
|
@ -0,0 +1,14 @@
|
|||
import re
|
||||
|
||||
|
||||
def check_number(file_path):
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
pattern = r'^(25|50|75|100|[1-9]\d*(25|50|75|00))$'
|
||||
for line in file:
|
||||
if re.match(pattern, line.strip()):
|
||||
print('yes')
|
||||
else:
|
||||
print('no')
|
||||
|
||||
file_path = 'TaskE01/test.in'
|
||||
check_number(file_path)
|
|
@ -0,0 +1,14 @@
|
|||
import re
|
||||
|
||||
def extract_digits(file_path):
|
||||
pattern = r'^(\d{2})-\d{3}$'
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
for line in file:
|
||||
match = re.match(pattern, line.strip())
|
||||
if match:
|
||||
print(match.group(1))
|
||||
else:
|
||||
print("<NONE>")
|
||||
|
||||
file_path = 'TaskE02/test.in'
|
||||
extract_digits(file_path)
|
|
@ -0,0 +1,14 @@
|
|||
import re
|
||||
|
||||
def nip(file_path):
|
||||
pattern = r'^\d{3}-\d{3}-\d{2}-\d{2}$|^\d{3}-\d{2}-\d{2}-\d{3}$'
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
for line in file:
|
||||
if re.match(pattern, line.strip()):
|
||||
print('yes')
|
||||
else:
|
||||
print('no')
|
||||
|
||||
|
||||
file_path = 'TaskE03/test.in'
|
||||
nip(file_path)
|
|
@ -0,0 +1,14 @@
|
|||
import re
|
||||
|
||||
def check_phone(file_path):
|
||||
pattern = r'^555(-\d{3}-\d{3}$|\s\d{3}\s\d{3}$)'
|
||||
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
for line in file:
|
||||
if re.match(pattern, line.strip()):
|
||||
print('yes')
|
||||
else:
|
||||
print('no')
|
||||
|
||||
file_path = 'TaskE04/test.in'
|
||||
check_phone(file_path)
|
|
@ -0,0 +1,14 @@
|
|||
import re
|
||||
|
||||
def akronim(file_path):
|
||||
pattern = r'^(PCMCIA|WYSIWYG|[A-Z]{2,5})$'
|
||||
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
for line in file:
|
||||
if re.match(pattern, line.strip()):
|
||||
print('yes')
|
||||
else:
|
||||
print('no')
|
||||
|
||||
file_path = 'TaskE05/test.in'
|
||||
akronim(file_path)
|
|
@ -0,0 +1,14 @@
|
|||
import re
|
||||
|
||||
def digits(file_path):
|
||||
pattern = r'^[1-9]\d{4,5}$'
|
||||
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
for line in file:
|
||||
if re.match(pattern, line.strip()):
|
||||
print('yes')
|
||||
else:
|
||||
print('no')
|
||||
|
||||
file_path = 'TaskE06/test.in'
|
||||
digits(file_path)
|
|
@ -0,0 +1,14 @@
|
|||
import re
|
||||
|
||||
def stars(file_path):
|
||||
pattern = r'^\*+$'
|
||||
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
for line in file:
|
||||
if re.match(pattern, line.strip()):
|
||||
print('yes')
|
||||
else:
|
||||
print('no')
|
||||
|
||||
file_path = 'TaskE07/test.in'
|
||||
stars(file_path)
|
|
@ -0,0 +1,14 @@
|
|||
import re
|
||||
|
||||
def hihi(file_path):
|
||||
pattern = r'^(hi){2,}!*$'
|
||||
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
for line in file:
|
||||
if re.match(pattern, line.strip()):
|
||||
print('yes')
|
||||
else:
|
||||
print('no')
|
||||
|
||||
file_path = 'TaskE08/test.in'
|
||||
hihi(file_path)
|
|
@ -0,0 +1,14 @@
|
|||
import re
|
||||
|
||||
def big_letter(file_path):
|
||||
pattern = r'.*[A-Z]\d{2}.*'
|
||||
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
for line in file:
|
||||
if re.match(pattern, line.strip()):
|
||||
print('yes')
|
||||
else:
|
||||
print('no')
|
||||
|
||||
file_path = 'TaskE09/test.in'
|
||||
big_letter(file_path)
|
|
@ -0,0 +1,14 @@
|
|||
import re
|
||||
|
||||
def big_letter(file_path):
|
||||
pattern = r'^[1-9A-F]0*$'
|
||||
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
for line in file:
|
||||
if re.match(pattern, line.strip()):
|
||||
print('yes')
|
||||
else:
|
||||
print('no')
|
||||
|
||||
file_path = 'TaskE10/test.in'
|
||||
big_letter(file_path)
|
|
@ -0,0 +1,18 @@
|
|||
import re
|
||||
|
||||
def check_equation(file_path):
|
||||
pattern = r'^\s*(x|[1-9]\d*)\s*[\+\-\*\/]\s*(x|[1-9]\d*)\s*=\s*(x|[1-9]\d*)\s*$'
|
||||
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
for line in file:
|
||||
line = line.strip()
|
||||
if re.match(pattern, line):
|
||||
if line.count('x') == 1:
|
||||
print('yes')
|
||||
else:
|
||||
print('no')
|
||||
else:
|
||||
print('no')
|
||||
|
||||
file_path = 'TaskE16/test.in'
|
||||
check_equation(file_path)
|
|
@ -0,0 +1,40 @@
|
|||
Koński łeb
|
||||
==========
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis jest napisem złożonym z
|
||||
ciągu 5 wielkich liter i 4 wielkich liter oddzielonych spacją, które
|
||||
wstukane na standardowym telefonie dadzą taki sam numer jak przy wstukaniu
|
||||
napisu "HORSE HEAD". Zakładamy standardowe mapowanie liter na cyfry w
|
||||
telefonie ("ABC" - 2, "DEF" - 3 itd.)
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string, check if the string consists of 5 capital letters
|
||||
and 4 lower case letter separated by space, which written on
|
||||
an old cell phone keyboard gives the same number as typing "HORSE HEAD".
|
||||
We assume standard old phone keyboard mapping ("ABC" - 2, "DEF" - 3, etc.)
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 27 z resztą 21.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 27 is 21.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 21/27
|
|
@ -0,0 +1,9 @@
|
|||
no
|
||||
no
|
||||
no
|
||||
yes
|
||||
yes
|
||||
no
|
||||
no
|
||||
no
|
||||
no
|
|
@ -0,0 +1,9 @@
|
|||
0MORSE HEAD
|
||||
AAAAA BBBB
|
||||
AAAAAA BBBB
|
||||
GOSRE IDAD
|
||||
HORSE HEAD
|
||||
MORSE HEAD
|
||||
MORSEHEAD
|
||||
ZOSRE IDAD
|
||||
morse head
|
|
@ -0,0 +1,36 @@
|
|||
Wynik meczu
|
||||
===========
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis reprezentuje wynik meczu
|
||||
piłkarskiego (dwie liczby oddzielone dwukropkiem). Maksymalna (sumaryczna)
|
||||
liczba bramek wynosi 10.
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string, check if the string stands for a soccer match result
|
||||
(two numbers separated by a colon). The Maximum (sum of two teams) number of goals is 10.
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 27 z resztą 22.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 27 is 22.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 22/27
|
|
@ -0,0 +1,11 @@
|
|||
yes
|
||||
yes
|
||||
no
|
||||
yes
|
||||
no
|
||||
no
|
||||
no
|
||||
yes
|
||||
yes
|
||||
no
|
||||
no
|
|
@ -0,0 +1,11 @@
|
|||
0:7
|
||||
10:10
|
||||
11:2
|
||||
2:1
|
||||
3
|
||||
3:101
|
||||
5-5
|
||||
5:2
|
||||
5:5
|
||||
:3
|
||||
xxxx
|
|
@ -0,0 +1,36 @@
|
|||
Wiek człowieka
|
||||
==============
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis reprezentuje wiek człowieka,
|
||||
tzn. jest postaci typu "45 lat". Maksymalny wiek - 99 lat.
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string, check if the string stands for human age (is in
|
||||
form of "45 lat"). The maximum age is 99 years.
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 27 z resztą 23.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 27 is 23.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 23/27
|
|
@ -0,0 +1,14 @@
|
|||
yes
|
||||
no
|
||||
yes
|
||||
no
|
||||
yes
|
||||
no
|
||||
yes
|
||||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
|
@ -0,0 +1,14 @@
|
|||
1 rok
|
||||
100 lat
|
||||
11 lat
|
||||
112 lat
|
||||
12 lat
|
||||
12 lata
|
||||
2 lata
|
||||
22 lat
|
||||
22 lata
|
||||
3 lata
|
||||
4 lata
|
||||
44 lata
|
||||
5 lat
|
||||
99 lat
|
|
@ -0,0 +1,40 @@
|
|||
Imię i nazwisko mężczyzny.
|
||||
==========================
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis reprezentuje imię i nazwisko
|
||||
mężczyzny. Imię i nazwisko to przynajmniej dwuliterowy napis zaczynający
|
||||
się wielką literą, po której następują małe litery. Dodatkowo imię nie może
|
||||
kończyć się na "a".
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string, check if the string stands for the first name and last name
|
||||
of a man. First name and last name are at least two character string
|
||||
starting with the capital letter, followed by lower case letter.
|
||||
Additionally, the First name can not finish with "a".
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 27 z resztą 24.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 27 is 24.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 24/27
|
|
@ -0,0 +1,8 @@
|
|||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
no
|
||||
yes
|
||||
yes
|
|
@ -0,0 +1,8 @@
|
|||
Aa Ax
|
||||
Ai Oi
|
||||
Atanazy Bazakbal
|
||||
Ax Aa
|
||||
Jan Maska
|
||||
Joanna Kowalska
|
||||
Kim Bo
|
||||
Oo Oo
|
|
@ -0,0 +1,39 @@
|
|||
Imię i nazwisko kobiety.
|
||||
========================
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis reprezentuje imię i nazwisko
|
||||
kobiety. Imię i nazwisko to przynajmniej dwuliterowy napis zaczynający się
|
||||
wielką literą, po której następują małe litery. Dodatkowo imię musi kończyć
|
||||
się na "a".
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string, check if the string stands for the first name and last name
|
||||
of a woman. First name and last name are at least two character string
|
||||
starting with the capital letter, followed by lower case letter.
|
||||
Additionally, the First name must finish with "a".
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 27 z resztą 25.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 27 is 25.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 25/27
|
|
@ -0,0 +1,9 @@
|
|||
yes
|
||||
no
|
||||
no
|
||||
no
|
||||
no
|
||||
yes
|
||||
no
|
||||
no
|
||||
yes
|
|
@ -0,0 +1,9 @@
|
|||
Aa Ax
|
||||
Ai Oi
|
||||
Atanazy Bazakbal
|
||||
Ax Aa
|
||||
Jan Maska
|
||||
Joanna Kowalska
|
||||
Kim Bo
|
||||
Oo Oo
|
||||
Za Mysz
|
|
@ -0,0 +1,38 @@
|
|||
Liczba całkowita
|
||||
================
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis reprezentuje liczbę
|
||||
całkowitą. Liczba nie powinna zawierać zer nieznaczących. Liczby dodatnie
|
||||
mogą opcjonalnie zaczynać się plusem.
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string, check if the string is an integer.
|
||||
The number should not contain leading zeros. Positive numbers
|
||||
can optionally start with a plus character.
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 27 z resztą 26.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 27 is 26.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 26/27
|
|
@ -0,0 +1,11 @@
|
|||
no
|
||||
yes
|
||||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
no
|
||||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
|
@ -0,0 +1,11 @@
|
|||
+0
|
||||
+5
|
||||
-0
|
||||
-11110
|
||||
-5
|
||||
0
|
||||
03434343435
|
||||
06
|
||||
100
|
||||
3434343435
|
||||
5
|
|
@ -0,0 +1,38 @@
|
|||
Liczba mniejsza niż 144
|
||||
=======================
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis reprezentuje liczbę
|
||||
całkowitą nieujemną mniejszą niż 143. Liczba nie powinna zawierać zer
|
||||
nieznaczących.
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string check, if the given string stands for
|
||||
non-negative integer lower than 143. The number should not
|
||||
contain leading zeros.
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 27 z resztą 0.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 27 is 0.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 0/27
|
|
@ -0,0 +1,13 @@
|
|||
no
|
||||
yes
|
||||
no
|
||||
no
|
||||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
no
|
||||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
|
@ -0,0 +1,13 @@
|
|||
-1
|
||||
0
|
||||
05
|
||||
098
|
||||
1000
|
||||
103
|
||||
139
|
||||
142
|
||||
143
|
||||
144
|
||||
5
|
||||
78
|
||||
99
|
|
@ -0,0 +1,38 @@
|
|||
Nazwą domenową.
|
||||
===============
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis reprezentuje nazwę domenową.
|
||||
Zakładamy, że nazwa domenowa składa się z 2 lub 3 członów oddzielonych
|
||||
kropkami. Każdy człon to ciąg małych liter.
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string, check if the string stands for a domain name.
|
||||
We assume, that the domain names consist of 2 or 3 digits
|
||||
separated by dots. Every element is a sequence of lower case letters.
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 27 z resztą 1.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 27 is 1.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 1/27
|
|
@ -0,0 +1,9 @@
|
|||
yes
|
||||
no
|
||||
no
|
||||
no
|
||||
yes
|
||||
yes
|
||||
no
|
||||
yes
|
||||
yes
|
|
@ -0,0 +1,9 @@
|
|||
bla.pl
|
||||
bla1.pl
|
||||
foo..tv
|
||||
foo.pl.
|
||||
foo.tv
|
||||
www.bla.pl
|
||||
www.haha.bla.pl
|
||||
x.y.z
|
||||
z.z
|
|
@ -0,0 +1,36 @@
|
|||
Identyfikator
|
||||
=============
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis jest identyfikatorem
|
||||
(ciągiem liter, cyfr i podkreślników nie zaczynających się cyfrą).
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string, check if the string is an id (sequence of letters, digits
|
||||
and underscores starting with a digit).
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 27 z resztą 2.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 27 is 2.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 2/27
|
|
@ -0,0 +1,11 @@
|
|||
no
|
||||
no
|
||||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
|
@ -0,0 +1,11 @@
|
|||
%haha%
|
||||
0zmienna
|
||||
2
|
||||
Gitorah
|
||||
_2
|
||||
_____
|
||||
_a_
|
||||
blo_34a
|
||||
godzilla
|
||||
x
|
||||
z0000000
|
|
@ -0,0 +1,36 @@
|
|||
Temperatura
|
||||
===========
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis jest liczbą całkowitą
|
||||
zakresu od -49 do 49. Liczba nie powinna zawierać zer nieznaczących.
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string, check if the string is an integer from -49 to 49.
|
||||
The integer should not contain leading zeros.
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 27 z resztą 3.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 27 is 3.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 3/27
|
|
@ -0,0 +1,11 @@
|
|||
no
|
||||
yes
|
||||
yes
|
||||
no
|
||||
yes
|
||||
yes
|
||||
no
|
||||
yes
|
||||
yes
|
||||
no
|
||||
yes
|
|
@ -0,0 +1,11 @@
|
|||
-200
|
||||
-21
|
||||
-49
|
||||
-50
|
||||
-9
|
||||
0
|
||||
100
|
||||
18
|
||||
49
|
||||
50
|
||||
7
|
|
@ -0,0 +1,37 @@
|
|||
Jedna samogłoska
|
||||
================
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis jest wyrazem zawierającym
|
||||
dokładnie jedną samogłoskę. Należy uwzględnić małe litery alfabetu
|
||||
łacińskiego.
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string, check if the string is an expression containing
|
||||
exactly one vowel. You should consider lower case Latin alphabet letters.
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 27 z resztą 4.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 27 is 4.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 4/27
|
|
@ -0,0 +1,9 @@
|
|||
no
|
||||
no
|
||||
yes
|
||||
no
|
||||
no
|
||||
no
|
||||
yes
|
||||
no
|
||||
yes
|
|
@ -0,0 +1,9 @@
|
|||
223
|
||||
aa
|
||||
dom
|
||||
html
|
||||
ostrach
|
||||
puko
|
||||
strach
|
||||
strachy
|
||||
u
|
|
@ -0,0 +1,38 @@
|
|||
Suma w dolarach
|
||||
===============
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis wyraża sumę w dolarach, tj.
|
||||
zaczyna się znakiem dolara, po którym następuje liczba dodatnia (bez zer
|
||||
nieznaczących).
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string, check if the string stands for an amount of dollar,
|
||||
starting with a dollar character followed by a positive integer
|
||||
(with no leading zeros).
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 27 z resztą 5.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 27 is 5.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 5/27
|
|
@ -0,0 +1,8 @@
|
|||
no
|
||||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
no
|
||||
no
|
|
@ -0,0 +1,8 @@
|
|||
$
|
||||
$0098
|
||||
$1
|
||||
$100
|
||||
$67592234
|
||||
$89
|
||||
10$100
|
||||
89
|
|
@ -0,0 +1,37 @@
|
|||
DNA
|
||||
===
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis jest niepustym ciągiem liter
|
||||
A, G, C, T, U, przy czym w jednym ciągu może wystąpić albo T, albo U nie
|
||||
obie litery równocześnie.
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string check, if the string is a non-empty sequence of letters
|
||||
A, G, C, T, U. In one sequence, there can be T or U, but not bout simultaneously.
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 27 z resztą 6.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 27 is 6.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 6/27
|
|
@ -0,0 +1,10 @@
|
|||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
no
|
||||
no
|
||||
yes
|
||||
no
|
|
@ -0,0 +1,10 @@
|
|||
89
|
||||
AAAAA
|
||||
AGCTTGGAAACT
|
||||
AGCUUGGAAACU
|
||||
G
|
||||
TAT
|
||||
TAU
|
||||
UAT
|
||||
UAU
|
||||
aaa
|
|
@ -0,0 +1,38 @@
|
|||
Hmmmmm
|
||||
======
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis to "hmmm....." - 'm'
|
||||
występuje 2 lub więcej razy, kropki są opcjonalne, ale jeśli występują
|
||||
muszą wystąpić przynajmniej 3 razy.
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string, if the string is "hmmm....." - 'm' occurs
|
||||
two times or more. Dots are optional, but if occur, they must
|
||||
occur at least 3 times.
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 27 z resztą 7.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 27 is 7.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 7/27
|
|
@ -0,0 +1,11 @@
|
|||
no
|
||||
no
|
||||
no
|
||||
yes
|
||||
yes
|
||||
no
|
||||
no
|
||||
yes
|
||||
yes
|
||||
no
|
||||
no
|
|
@ -0,0 +1,11 @@
|
|||
ahmmmm.....
|
||||
hhmmm.....
|
||||
hm.....
|
||||
hmm
|
||||
hmm...
|
||||
hmmm.
|
||||
hmmm..
|
||||
hmmm....
|
||||
hmmmm......
|
||||
hmmmm.....?!
|
||||
mmm....
|
|
@ -0,0 +1,38 @@
|
|||
Lalalo!
|
||||
=======
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis jest śpiewem, tj. jest
|
||||
ciągiem sylab "li", "la", "lo" (co najmniej dwóch), po którym następuje
|
||||
opcjonalny ciąg wykrzykników.
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string, check if the string is singing, this is
|
||||
sequence of syllables "li", "la", "lo" (at least 2), followed
|
||||
by an optional sequence of exclamation marks.
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 27 z resztą 8.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 27 is 8.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 8/27
|
|
@ -0,0 +1,8 @@
|
|||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
no
|
||||
yes
|
||||
no
|
||||
no
|
|
@ -0,0 +1,8 @@
|
|||
!!lala!!
|
||||
lala
|
||||
lilala!!!
|
||||
lilili!!!!
|
||||
lol
|
||||
lololali!
|
||||
luli
|
||||
ola!
|
|
@ -0,0 +1,34 @@
|
|||
Minuty
|
||||
======
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy wydobyć minuty z podanego napisu reprezentującego
|
||||
godzinę w formacie typu "9:13", "18:44" wyciąga minuty. Funkcja powinna
|
||||
zwracać napis "<NONE>", jeśli podany napis nie jest godziną. Jeśli napis
|
||||
nie spełnia podanych warunków, należy wypisać "<NONE>".
|
||||
|
||||
For each string, extract the minutes from the given string represented
|
||||
by time in "9:13", "18:44" format. The function should return "<NONE>"
|
||||
string, if the string is not a time.
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 27 z resztą 9.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 27 is 9.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 9/27
|
|
@ -0,0 +1,7 @@
|
|||
00
|
||||
44
|
||||
59
|
||||
<NONE>
|
||||
13
|
||||
<NONE>
|
||||
<NONE>
|
|
@ -0,0 +1,7 @@
|
|||
0:00
|
||||
18:44
|
||||
23:59
|
||||
25:14
|
||||
9:13
|
||||
9:61
|
||||
x9:13y
|
|
@ -0,0 +1,37 @@
|
|||
Numer kierunkowy
|
||||
================
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy wydobyć numer kierunkowy z numeru telefonu.
|
||||
Zakładamy, że numer kierunkowy jest dwucyfrowy, musi być poprzedzony zerem
|
||||
lub plusem. Pozostała część numeru to 7 cyfr zapisanych w postaci N-NNN-NNN
|
||||
bądź NNN-NN-NN. Jeśli napis nie spełnia podanych warunków, należy wypisać
|
||||
"<NONE>".
|
||||
|
||||
For each string, extract an area code from the phone number.
|
||||
We assume, that the phone number is two digits, is preceded by zero or plus.
|
||||
The rest of the phone number is 7 digits written in N-NNN-NNN
|
||||
or NNN-NN-NN form.
|
||||
If the string does not fulfill the condition, you should print "<NONE>".
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 7 z resztą 2.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 7 is 2.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 2/7
|
|
@ -0,0 +1,9 @@
|
|||
<NONE>
|
||||
61
|
||||
61
|
||||
61
|
||||
61
|
||||
82
|
||||
<NONE>
|
||||
<NONE>
|
||||
<NONE>
|
|
@ -0,0 +1,9 @@
|
|||
(082) 123-45-67
|
||||
+61 5-555-553
|
||||
+61 555-55-55
|
||||
061 5-555-553
|
||||
061 555-55-55
|
||||
082 123-45-67
|
||||
082 123-45-67x
|
||||
082 23-45-67
|
||||
82 123-45-67
|
|
@ -0,0 +1,40 @@
|
|||
Numer domu
|
||||
==========
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy wydobyć numer domu z adresu. Zakładamy, że adres
|
||||
składa się ze skrótu "ul.", "os." bądź "al.", z nazwy ulicy, numeru domu i
|
||||
opcjonalnego numeru mieszkania (oddzielonego od numeru domu ukośnikiem bądź
|
||||
napisem " m. "). Nazwa ulicy składa się z co najmniej 2 liter (łącznie z
|
||||
polskimi znakami), zaczyna się wielką literą. Jeśli napis nie spełnia
|
||||
podanych warunków, należy wypisać "<NONE>".
|
||||
|
||||
For each string, you should extract the building number from the address.
|
||||
We assume, that the address consists of the abbreviation "ul.", "os.' or "al."
|
||||
street name, building name, and an optional number of apartment number
|
||||
(separated from building number by a slash or " m. ". The street number
|
||||
consists of at least 2 letters (including polish letters), starting with
|
||||
the capital letter.
|
||||
If the string does not fulfill the condition, you should print "<NONE>".
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 7 z resztą 3.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 7 is 3.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 3/7
|
|
@ -0,0 +1,7 @@
|
|||
11
|
||||
<NONE>
|
||||
<NONE>
|
||||
<NONE>
|
||||
34
|
||||
<NONE>
|
||||
7
|
|
@ -0,0 +1,7 @@
|
|||
al. Xa 11/34
|
||||
bla
|
||||
os. Piastów 034 m. 2
|
||||
os. Piastów 34 m. 0
|
||||
os. Piastów 34 m. 2
|
||||
osa Piastów 34 m. 2
|
||||
ul. Chochlików 7
|
|
@ -0,0 +1,36 @@
|
|||
Kod PIN
|
||||
=======
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis jest 6-cyfrowym kodem PIN,
|
||||
przy czym zakładamy, że kod PIN może zawierać co najwyżej jedno zero.
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string, check if the string is 6 digit PIN number.
|
||||
We assume that the PIN number can contain at most one zero.
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 7 z resztą 4.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 7 is 4.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 4/7
|
|
@ -0,0 +1,12 @@
|
|||
no
|
||||
yes
|
||||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
no
|
||||
no
|
|
@ -0,0 +1,12 @@
|
|||
000000
|
||||
012345
|
||||
1111
|
||||
111201
|
||||
112130
|
||||
121144
|
||||
12345
|
||||
211301
|
||||
465542
|
||||
707871
|
||||
888800
|
||||
WTF
|
|
@ -0,0 +1,39 @@
|
|||
Wiek człowieka
|
||||
==============
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis reprezentuje wiek człowiek,
|
||||
tzn. jest postaci typu "45 lat", przy czym dla pierwszych lat wyjątkowo -
|
||||
"1 roczek", "2 latka", "3 latka", "4 latka". Maksymalny wiek - 110 lat.
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string, check if the string is an age of human,
|
||||
this is the form of "45 lat". For the first years, exceptionally -
|
||||
"1 roczek", "2 latka", "3 latka", "4 latka". The maximum age is 110 years.
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 7 z resztą 5.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 7 is 5.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 5/7
|
|
@ -0,0 +1,18 @@
|
|||
yes
|
||||
yes
|
||||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
no
|
||||
yes
|
||||
no
|
||||
yes
|
||||
no
|
||||
yes
|
||||
yes
|
||||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
no
|
|
@ -0,0 +1,18 @@
|
|||
1 roczek
|
||||
101 lat
|
||||
104 lat
|
||||
104 lata
|
||||
11 lat
|
||||
110 lat
|
||||
111 lat
|
||||
12 lat
|
||||
12 lata
|
||||
2 latka
|
||||
22 lat
|
||||
22 lata
|
||||
3 latka
|
||||
4 lata
|
||||
4 latka
|
||||
44 lata
|
||||
5 lat
|
||||
5 latek
|
|
@ -0,0 +1,36 @@
|
|||
Wiek człowieka 2
|
||||
================
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis reprezentuje wiek człowiek,
|
||||
tzn. jest postaci typu "45 lat". Maksymalny wiek — 123 lata.
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
|
||||
For each string, check if the string is an age of human,
|
||||
this is the form of "45 lat". The maximum age is 123 years.
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 7 z resztą 6.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 7 is 6.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 6/7
|
|
@ -0,0 +1,19 @@
|
|||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
no
|
||||
yes
|
||||
no
|
||||
no
|
||||
yes
|
||||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
no
|
|
@ -0,0 +1,19 @@
|
|||
1 lata
|
||||
1 rok
|
||||
100 lat
|
||||
11 lat
|
||||
112 lat
|
||||
12 lat
|
||||
12 lata
|
||||
123 lata
|
||||
124 lata
|
||||
130 lat
|
||||
2 lata
|
||||
22 lat
|
||||
22 lata
|
||||
3 lata
|
||||
4 lata
|
||||
44 lata
|
||||
5 lat
|
||||
99 lat
|
||||
x10 lat
|
|
@ -0,0 +1,39 @@
|
|||
Big "NO!"
|
||||
=========
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy zadany napis to "NIE" lub "NO", w
|
||||
którym odpowiednio "E" bądź "O" występuję co najmniej 6 razy, po czy
|
||||
występują co najmniej 3 wykrzykniki. Zob.
|
||||
http://tvtropes.org/pmwiki/pmwiki.php/Main/BigNo
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string check, if the string is "NIE" or "NO",
|
||||
where "E" or "O" occurs at least 6 times, followed by at least 3
|
||||
exclamation marks. Check
|
||||
http://tvtropes.org/pmwiki/pmwiki.php/Main/BigNo
|
||||
If the string fulfills the condition, you should print 'yes' on the standard output and 'no' otherwise.
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 7 z resztą 0.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 7 is 0.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 0/7
|
|
@ -0,0 +1,7 @@
|
|||
no
|
||||
yes
|
||||
no
|
||||
yes
|
||||
yes
|
||||
no
|
||||
no
|
|
@ -0,0 +1,7 @@
|
|||
NIE!!!!!!
|
||||
NIEEEEEE!!!!
|
||||
NOOOO!!!
|
||||
NOOOOOO!!!
|
||||
NOOOOOOOOO!!!!!!!
|
||||
NOOOOOOOOOOOOOOOO!!
|
||||
xxxxNIEEEEEEEEEEEEEEEE!!!!!!!!!!!
|
|
@ -0,0 +1,44 @@
|
|||
Mem 1
|
||||
=====
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy zadany napis to ciąg liter
|
||||
(uwzględnić też polskie znaki) po którym następuje ciąg wykrzykników
|
||||
zamiast których może wystąpić "1", "one" albo "eleven". W napisie muszą
|
||||
pojawić się co najmniej 2 wykrzykniki, niekoniecznie obok siebie oraz co
|
||||
najmniej jedno "1", "one" lub "eleven". Zob.
|
||||
http://knowyourmeme.com/memes/the-1-phenomenon
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string check, if the string is a sequence
|
||||
of letters (including polish letters), followed by a sequence
|
||||
of exclamation marks, instead of which, there may be
|
||||
"1", "one" or "eleven". In the string, there must be at least
|
||||
2 exclamation marks, not necessarily next to each other,
|
||||
at least one "1", "one" or "eleven". Check
|
||||
http://knowyourmeme.com/memes/the-1-phenomenon
|
||||
If the string fulfills the condition, you should print 'yes' on the standard output and 'no' otherwise.
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 7 z resztą 1.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 7 is 1.
|
||||
|
||||
POINTS: 1
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 1/7
|
|
@ -0,0 +1,20 @@
|
|||
import re
|
||||
|
||||
def pattern(file_path):
|
||||
pattern = r'^[a-zA-ZąćęłńóśżźĄĆĘŁŃÓŚŻŹ]+(!+|1|one|eleven)+$'
|
||||
one_eleven_pattern = r'(1|one|eleven)'
|
||||
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
for line in file:
|
||||
line = line.strip()
|
||||
if re.match(pattern, line):
|
||||
if line.count('!') >= 2 and re.search(one_eleven_pattern, line):
|
||||
print('yes')
|
||||
else:
|
||||
print('no')
|
||||
else:
|
||||
print('no')
|
||||
|
||||
|
||||
file_path = 'TaskE43/test.in'
|
||||
pattern(file_path)
|
|
@ -0,0 +1,14 @@
|
|||
yes
|
||||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
no
|
||||
yes
|
||||
no
|
||||
yes
|
||||
no
|
||||
no
|
||||
yes
|
||||
no
|
|
@ -0,0 +1,14 @@
|
|||
Foo!!one!!1
|
||||
Foo!1
|
||||
Foo!1!
|
||||
Foo!one!1!eleven
|
||||
Foo!one!1eleven
|
||||
X!!1
|
||||
X!1
|
||||
Xone!!
|
||||
Ś!elevenelevenone
|
||||
Ś!elevenelevenone!
|
||||
Ś!elevenelevenoneX
|
||||
Źdź3bło!!!!!1
|
||||
Źdźbło!!!!!1
|
||||
Źdźbło!!!!!1?
|
|
@ -0,0 +1,42 @@
|
|||
Nazwisko żeńskie
|
||||
================
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy wydobyć nazwisko kobiety z pary imię-nazwisko.
|
||||
Zakładamy, że kobietę identyfikujemy po imieniu zakończonym na "a",
|
||||
wyjąwszy imiona "Kosma" i "Jarema". Imię i nazwisko składa się z liter
|
||||
(włącznie z polskimi znakami), zaczyna się wielką literą (włącznie z
|
||||
literami "Ć", "Ł", "Ś", "Ź" i "Ż"). Imię i nazwisko powinno składać się z
|
||||
przynajmniej 2 liter. Jeśli napis nie spełnia podanych warunków, należy
|
||||
wypisać "<NONE>". Jeśli napis nie spełnia podanych warunków, należy wypisać
|
||||
"<NONE>".
|
||||
|
||||
For each string, extract the last woman's name from pair first name- last name.
|
||||
We assume, that woman's first name ends with "a", except first names
|
||||
"Kosma" and "Jarema". First name and Last name consist of letters
|
||||
(including polish characters), starts with a capital letter
|
||||
(including "Ć", "Ł", "Ś", "Ź" i "Ż"). The first name and last name
|
||||
should consist of at least 2 letters.
|
||||
If the string doesn't fulfill the condition, you should print "<NONE>".
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 5 z resztą 4.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 5 is 4.
|
||||
|
||||
POINTS: 2
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 4/5
|
|
@ -0,0 +1,14 @@
|
|||
<NONE>
|
||||
Kowalska
|
||||
Długi
|
||||
<NONE>
|
||||
<NONE>
|
||||
<NONE>
|
||||
<NONE>
|
||||
<NONE>
|
||||
Xa
|
||||
<NONE>
|
||||
<NONE>
|
||||
<NONE>
|
||||
Żuraś
|
||||
<NONE>
|
|
@ -0,0 +1,14 @@
|
|||
A Xa
|
||||
Anna Kowalska
|
||||
Hanna Długi
|
||||
Jan Kowalski
|
||||
Jarema Kowalski
|
||||
Joanna Maria Nowak
|
||||
Kosma Nowak
|
||||
Ua X
|
||||
Ua Xa
|
||||
a Xa
|
||||
anna Kowalska
|
||||
Ąnna Kowalska
|
||||
Żaneta Żuraś
|
||||
żaneta Żuraś
|
|
@ -0,0 +1,41 @@
|
|||
Nazwisko męskie
|
||||
===============
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy wydobyć nazwisko mężczyzny z pary imię-nazwisko.
|
||||
Zakładamy, że meżczyznę identyfikujemy po imieniu zakończonym na literę
|
||||
inną niż "a" plus imiona "Kosma" i "Jarema". Imię i nazwisko składa się z
|
||||
liter (włącznie z polskimi znakami), zaczyna się wielką literą (włącznie z
|
||||
literami "Ć", "Ł", "Ś", "Ź" i "Ż"). Imię i nazwisko powinno składać się z
|
||||
przynajmniej 2 liter. Jeśli napis nie spełnia podanych warunków, należy
|
||||
wypisać "<NONE>".
|
||||
|
||||
For each string, extract the man's last name from pair first name- last name.
|
||||
We assume, that man's first name ends with all letters, but "a", except first names
|
||||
"Kosma" and "Jarema". First name and Last name consist of letters
|
||||
(including polish characters), starts with a capital letter
|
||||
(including "Ć", "Ł", "Ś", "Ź" i "Ż"). The first name and last name
|
||||
should consist of at least 2 letters.
|
||||
If the string doesn't fulfill the condition, you should print "<NONE>".
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 5 z resztą 0.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 5 is 0.
|
||||
|
||||
POINTS: 2
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 0/5
|
|
@ -0,0 +1,14 @@
|
|||
<NONE>
|
||||
<NONE>
|
||||
<NONE>
|
||||
<NONE>
|
||||
Nowak
|
||||
Ścież
|
||||
Źdźbło
|
||||
<NONE>
|
||||
Xa
|
||||
<NONE>
|
||||
<NONE>
|
||||
<NONE>
|
||||
Żuraś
|
||||
<NONE>
|
|
@ -0,0 +1,14 @@
|
|||
Anna Kowalska
|
||||
E Xa
|
||||
Hanna Długi
|
||||
Jan Adam Nowak
|
||||
Jan Nowak
|
||||
Jarema Ścież
|
||||
Kosma Źdźbło
|
||||
Ue X
|
||||
Ue Xa
|
||||
e Xa
|
||||
jan Nowak
|
||||
Ądam Kowalski
|
||||
Łukasz Żuraś
|
||||
łukasz Żuraś
|
|
@ -0,0 +1,43 @@
|
|||
Wydobywanie nazwy pliku
|
||||
=======================
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy wydobyć nazwę pliku z pełnej ścieżki. Należy
|
||||
uwzględnić dwie konwencje - (1) linuksową (ścieżka zaczyna się ukośnikiem,
|
||||
poszczególne jej elementy też oddzielane są ukośnikiem), (2) windowsową
|
||||
(ścieżka zaczyna się od nazwy dysku - wielka litera i dwukropek, potem
|
||||
następują katalogi oddzielonę odwróconym ukośnikiem), konwencje nie mogą
|
||||
się mieszać. Jako nazwa katalogu i pliku może wystąpić dowolny niepusty
|
||||
ciąg znaków niebędących ukośnikiem ani odwróconym ukośnikiem. Jeśli napis
|
||||
nie spełnia podanych warunków, należy wypisać "<NONE>".
|
||||
|
||||
For each string extract filename from a full path.
|
||||
You should consider two conventions- (1) Linux (the path starts with
|
||||
the forward slash, elements are separated by a forward slash), (2)- windows
|
||||
(the path starts with disk name- capital letter, colon, then
|
||||
directories separated by a backward slash), conventions can not
|
||||
mix. The dir name or file name can be any non-empty
|
||||
sequence of string, which are not forward slash or backward slash.
|
||||
If the string doesn't fulfill the condition, you should print "<NONE>".
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 5 z resztą 1.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 5 is 1.
|
||||
|
||||
POINTS: 2
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 1/5
|
|
@ -0,0 +1,13 @@
|
|||
w--www
|
||||
Plik.txt
|
||||
<NONE>
|
||||
tuxracer
|
||||
<NONE>
|
||||
stronka.html
|
||||
<NONE>
|
||||
<NONE>
|
||||
<NONE>
|
||||
<NONE>
|
||||
bla.txt
|
||||
<NONE>
|
||||
<NONE>
|
|
@ -0,0 +1,13 @@
|
|||
/a/x/y/z/q/w--www
|
||||
/home/megapiranha/tajne/Plik.txt
|
||||
/usr//bin/tuxracer
|
||||
/usr/bin/tuxracer
|
||||
/usr/bin/tuxracer/
|
||||
C:\Windows\Lamer\stronka.html
|
||||
C:\Windows\Lamer\stronka.html\
|
||||
C:\Windows\\Lamer\stronka.html\
|
||||
C:\foo/bar
|
||||
Windows\Lamer\stronka.html
|
||||
X:\bla.txt
|
||||
\Windows\Lamer\stronka.html
|
||||
usr/bin/tuxracer
|
|
@ -0,0 +1,38 @@
|
|||
Wydobywanie hashtagów
|
||||
=====================
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy wydobyć wszystkie hashtagi twitterowe z napisu.
|
||||
Zakładamy, że hashtag to ciąg małych i wielkich liter oraz cyfr
|
||||
(niezaczynający się cyfrą) i poprzedzony znakiem '#'. Hashtagi należy
|
||||
wypisać oddzielone średnikami. Jeśli napis nie spełnia podanych warunków,
|
||||
należy wypisać "<NONE>".
|
||||
|
||||
For each string, extract all Twitter hashtags from the string.
|
||||
We assume, that a hashtag is a sequence of lower case letters,
|
||||
capital case letters, and digits (can not start with a digit),
|
||||
starting with the '#' character. You should print hashtags separated by
|
||||
a comma.
|
||||
If the string doesn't fulfill the condition, you should print "<NONE>".
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 5 z resztą 2.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 5 is 2.
|
||||
|
||||
POINTS: 2
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 2/5
|
|
@ -0,0 +1,5 @@
|
|||
#UFO
|
||||
#a;#A;#PoKeMoN0
|
||||
<NONE>
|
||||
<NONE>
|
||||
#Rambo61;#Rocky9
|
|
@ -0,0 +1,5 @@
|
|||
Dzisiaj widziałem #UFO na niebie.
|
||||
Dziwne hasztagi: #a, #A, #PoKeMoN0, ale to nie: #0PoKeMoN.
|
||||
Tu nie ma hasztaga.
|
||||
Tu też nie ma hasztaga, chociaż jest #.
|
||||
Zawiodłem się na #Rambo61, chociaż lubiłem #Rocky9.
|
|
@ -0,0 +1,40 @@
|
|||
PoKeMoN
|
||||
=======
|
||||
|
||||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Dla każdego napisu należy sprawdzić, czy napis składa się z naprzemian
|
||||
występujących małych i wielkich liter. Napis może zaczynać się i kończyć
|
||||
małą bądź wielką literą. Należy uwzględnić polskie znaki. Napis musi
|
||||
składać się z przynajmniej 2 znaków.
|
||||
Jeśli napis spełnia tak określony warunek, należy wypisać na
|
||||
standardowym wyjściu 'yes', w przeciwnym razie — 'no'.
|
||||
|
||||
For each string, check if the string is a sequence of alternately
|
||||
occurring lower and capital case letters. The string may start and end
|
||||
with a lower or capital case letter. You should consider the polish characters.
|
||||
The string should consist of at least two letters.
|
||||
If the string fulfills the condition, you should print 'yes' on the
|
||||
standard output and 'no' otherwise.
|
||||
|
||||
|
||||
UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu
|
||||
dzieli się przez 5 z resztą 3.
|
||||
|
||||
Attention. The task is for students whose students id remainder of the division by 5 is 3.
|
||||
|
||||
POINTS: 2
|
||||
DEADLINE: 2021-12-04 23:59:59
|
||||
REMAINDER: 3/5
|
|
@ -0,0 +1,16 @@
|
|||
import re
|
||||
|
||||
def pattern(file_path):
|
||||
pattern = r'^(([a-ząćęłńóśżź][A-ZĄĆĘŁŃÓŚŻŹ])+|([A-ZĄĆĘŁŃÓŚŻŹ][a-ząćęłńóśżź])+)'
|
||||
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
for line in file:
|
||||
line = line.strip()
|
||||
if re.match(pattern, line) and len(line) >= 2:
|
||||
print('yes')
|
||||
else:
|
||||
print('no')
|
||||
|
||||
|
||||
file_path = 'TaskE48/test.in'
|
||||
pattern(file_path)
|
|
@ -0,0 +1,12 @@
|
|||
no
|
||||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
yes
|
||||
no
|
||||
no
|
||||
no
|
||||
yes
|
||||
yes
|
||||
yes
|
|
@ -0,0 +1,12 @@
|
|||
2yĆó
|
||||
POKEmon
|
||||
PoKeMoN
|
||||
RyĆó
|
||||
oK
|
||||
pOkEmOn
|
||||
pokemon
|
||||
y
|
||||
Ć
|
||||
ŹdŹbŁo
|
||||
ŹlExSiĘ
|
||||
źDźBłO
|
|
@ -0,0 +1,19 @@
|
|||
Napisać program, który wczytuje kolejne wiersze ze standardowego
|
||||
wejścia i analizuje każdy wiersz (bez znaku końca wiersza). Należy w
|
||||
jak największym stopniu wykorzystać wyrażenia regularne (np. nie wolno
|
||||
użyć negacji jako operacji w danym języku programowania, jeśli da się
|
||||
to wyrazić w samym wyrażeniu regularnym). Tam, gdzie to możliwe należy
|
||||
użyć pojedynczego wyrażenia regularnego.
|
||||
|
||||
Write a program, which loads consecutive lines from standard input
|
||||
and analyze every line (with no newline character). You should
|
||||
use regular expressions to the greatest extent possible (e.g. you
|
||||
can not use negation in the programming language if it is
|
||||
possible to express the same in regular expression). Wherever possible,
|
||||
use one regular expression.
|
||||
|
||||
Write a program to substitute all 4-digits string to 4-characters string.
|
||||
In the substituted string "0" should change to "a", "1" should change to "b", "2" should change to "c", etc.
|
||||
E.g. "1162" should change to "bbgc".
|
||||
In this task digit means [0-9] class.
|
||||
|
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue