diff --git a/README.md b/README.md index 4d03dfc..62bd793 100644 --- a/README.md +++ b/README.md @@ -238,4 +238,13 @@ print(r"\") re.search('\\', r'a\bc') re.search(r'\\', r'a\bc') re.search('\\\\', r'a\bc') -``` \ No newline at end of file +``` +## Zajęcia 4 27.11.2023 Wyrażenia regularne 2 + +E00 - E09 - po jedno dla każdego + +E10 - E36 - po jedno dla każdego + +E37 - E43 - po jedno dla każdego + +E44 - E48 - po jedno dla każdego \ No newline at end of file diff --git a/TaskE00/description.txt b/TaskE00/description.txt new file mode 100644 index 0000000..e4addd8 --- /dev/null +++ b/TaskE00/description.txt @@ -0,0 +1,36 @@ +Liczby podzielne przez 5 +======================== + +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 jest liczbą całkowitą +podzielną przez 5. Napis nie powinien 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 is an integer divisible by 5. +The string 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 10 z resztą 0. + +Attention. The task is for students whose students id remainder of the division by 10 is 0. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 0/10 diff --git a/TaskE00/test.exp b/TaskE00/test.exp new file mode 100644 index 0000000..408e922 --- /dev/null +++ b/TaskE00/test.exp @@ -0,0 +1,10 @@ +yes +yes +no +yes +no +no +yes +no +yes +no diff --git a/TaskE00/test.in b/TaskE00/test.in new file mode 100644 index 0000000..576dd87 --- /dev/null +++ b/TaskE00/test.in @@ -0,0 +1,10 @@ +-1005 +-50 +-76 +0 +00 +01000 +1000 +353 +465 +@!q diff --git a/TaskE01/description.txt b/TaskE01/description.txt new file mode 100644 index 0000000..224c620 --- /dev/null +++ b/TaskE01/description.txt @@ -0,0 +1,35 @@ +Liczby podzielne przez 25 +========================= + +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 jest dodatnią liczbą +podzielną przez 25. +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 is a positive integer divisible by 25. +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 10 z resztą 1. + +Attention. The task is for students whose students id remainder of the division by 10 is 1. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 1/10 diff --git a/TaskE01/test.exp b/TaskE01/test.exp new file mode 100644 index 0000000..7f347d5 --- /dev/null +++ b/TaskE01/test.exp @@ -0,0 +1,8 @@ +no +yes +yes +yes +no +no +no +no diff --git a/TaskE01/test.in b/TaskE01/test.in new file mode 100644 index 0000000..3fb76e1 --- /dev/null +++ b/TaskE01/test.in @@ -0,0 +1,8 @@ +0 +1000 +111111125 +25 +353 +465 +@!q +x50 diff --git a/TaskE02/description.txt b/TaskE02/description.txt new file mode 100644 index 0000000..4e8c870 --- /dev/null +++ b/TaskE02/description.txt @@ -0,0 +1,36 @@ +Kody pocztowe +============= + +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ć z kodu pocztowego kod miasta (2 pierwsze +cyfry). Jeśli napis nie jest kodem pocztowym, należy wypisać "". +Zakładamy, że kod pocztowy składa się z 2 cyfr, minusa i 3 cyfr. Jeśli +napis nie spełnia podanych warunków, należy wypisać "". + +For each string, extract the postal code of a city (2 first digits). +If the string is not a postal code, you should print "". +We assume that the postal code consists of 2 digits, minus character, and 3 digits. +If the string doesn't fulfill the condition, you should print "". + + +UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu +dzieli się przez 10 z resztą 2. + +Attention. The task is for students whose students id remainder of the division by 10 is 2. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 2/10 diff --git a/TaskE02/test.exp b/TaskE02/test.exp new file mode 100644 index 0000000..189b4b4 --- /dev/null +++ b/TaskE02/test.exp @@ -0,0 +1,6 @@ + + +23 + +61 + diff --git a/TaskE02/test.in b/TaskE02/test.in new file mode 100644 index 0000000..f79c5fb --- /dev/null +++ b/TaskE02/test.in @@ -0,0 +1,6 @@ +!@#$%^& +0-333 +23-000 +61-23 +61-680 +BigFoot diff --git a/TaskE03/description.txt b/TaskE03/description.txt new file mode 100644 index 0000000..ecc2f49 --- /dev/null +++ b/TaskE03/description.txt @@ -0,0 +1,37 @@ +Numer NIP +========= + +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 numerem NIP zapisanym w +formacie xxx-xxx-xx-xx bądź xxx-xx-xx-xxx. Nie trzeba brać pod uwagę sumy +kontrolnej. +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 NIP number written in +xxx-xxx-xx-xx bądź xxx-xx-xx-xxx format. You don't need to consider a checksum. +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 10 z resztą 3. + +Attention. The task is for students whose students id remainder of the division by 10 is 3. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 3/10 diff --git a/TaskE03/test.exp b/TaskE03/test.exp new file mode 100644 index 0000000..29fe7aa --- /dev/null +++ b/TaskE03/test.exp @@ -0,0 +1,5 @@ +yes +yes +yes +no +no diff --git a/TaskE03/test.in b/TaskE03/test.in new file mode 100644 index 0000000..5707927 --- /dev/null +++ b/TaskE03/test.in @@ -0,0 +1,5 @@ +000-00-00-000 +345-45-12-334 +345-455-12-34 +345-455-12-349 +3454551234 diff --git a/TaskE04/description.txt b/TaskE04/description.txt new file mode 100644 index 0000000..215bbe9 --- /dev/null +++ b/TaskE04/description.txt @@ -0,0 +1,37 @@ +Telefon filmowy +=============== + +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 9-cyfrowym numerem +telefonu zapisanym w formacie "NNN-NNN-NNN" badź "NNN NNN NNN" zaczynającym +sie od kombinacji "555". +Jeśli napis spełnia tak określony warunek, należy wypisać na +standardowym wyjściu 'yes', w przeciwnym razie — 'no'. + +For each string, you should check, if the string is a 9-digit phone number +written in "NNN-NNN-NNN" or "NNN NNN NNN" format, which starts with "555". +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 10 z resztą 4. + +Attention. The task is for students whose students id remainder of the division by 10 is 4. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 4/10 diff --git a/TaskE04/test.exp b/TaskE04/test.exp new file mode 100644 index 0000000..809ec3e --- /dev/null +++ b/TaskE04/test.exp @@ -0,0 +1,12 @@ +no +no +no +yes +no +yes +no +yes +yes +no +no +no diff --git a/TaskE04/test.in b/TaskE04/test.in new file mode 100644 index 0000000..73010fc --- /dev/null +++ b/TaskE04/test.in @@ -0,0 +1,12 @@ +055-555-555 +505-324-555 +551-233-455 +555 000 000 +555 000-000 +555 123 456 +555-000 000 +555-000-000 +555-123-456 +556 345 667 +556 345 6675 +556 345-667 diff --git a/TaskE05/description.txt b/TaskE05/description.txt new file mode 100644 index 0000000..3f86be5 --- /dev/null +++ b/TaskE05/description.txt @@ -0,0 +1,38 @@ +Akronim +======= + +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 akronimem (ciągiem co +najmniej dwóch i co najwyżej pięciu wielkich liter. Dodatkowo należy +uwzględnić akronimy "PCMCIA" i "WYSIWYG". +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 acronym (sequence +of at least 2 and at most 5 capital letters. +Additionally, you should include acronyms "PCMCIA" i "WYSIWYG". +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 10 z resztą 5. + +Attention. The task is for students whose students id remainder of the division by 10 is 5. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 5/10 diff --git a/TaskE05/test.exp b/TaskE05/test.exp new file mode 100644 index 0000000..a5ff398 --- /dev/null +++ b/TaskE05/test.exp @@ -0,0 +1,11 @@ +no +yes +yes +no +yes +yes +no +no +no +yes +yes diff --git a/TaskE05/test.in b/TaskE05/test.in new file mode 100644 index 0000000..7242285 --- /dev/null +++ b/TaskE05/test.in @@ -0,0 +1,11 @@ +AAAAAA +ABCDE +ATX +P +PC +PCMCIA +PCMCIB +Pc +WYSIWYA +WYSIWYG +ZZZZ diff --git a/TaskE06/description.txt b/TaskE06/description.txt new file mode 100644 index 0000000..d51a6f3 --- /dev/null +++ b/TaskE06/description.txt @@ -0,0 +1,35 @@ +Liczba pięcio bądź sześciocyfrowa +================================= + +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ę pięcio- +bądź sześciocyfrową. 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 represents +5 or 6 digits number. 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 10 z resztą 6. + +Attention. The task is for students whose students id remainder of the division by 10 is 6. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 6/10 diff --git a/TaskE06/test.exp b/TaskE06/test.exp new file mode 100644 index 0000000..daafc65 --- /dev/null +++ b/TaskE06/test.exp @@ -0,0 +1,10 @@ +no +no +yes +yes +yes +yes +no +no +yes +yes diff --git a/TaskE06/test.in b/TaskE06/test.in new file mode 100644 index 0000000..a8331f2 --- /dev/null +++ b/TaskE06/test.in @@ -0,0 +1,10 @@ +012345 +0123456 +10000 +100001 +12345 +123456 +333333333333 +9999 +99999 +999999 diff --git a/TaskE07/description.txt b/TaskE07/description.txt new file mode 100644 index 0000000..d98fbe1 --- /dev/null +++ b/TaskE07/description.txt @@ -0,0 +1,35 @@ +Gwiazdek +======== + +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 samych gwiazdek +(co najmniej jednej). +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 consists of only asterisks (at least one). +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 10 z resztą 7. + +Attention. The task is for students whose students id remainder of the division by 10 is 7. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 7/10 diff --git a/TaskE07/test.exp b/TaskE07/test.exp new file mode 100644 index 0000000..524e65e --- /dev/null +++ b/TaskE07/test.exp @@ -0,0 +1,7 @@ +yes +yes +yes +yes +no +no +no diff --git a/TaskE07/test.in b/TaskE07/test.in new file mode 100644 index 0000000..ec2947d --- /dev/null +++ b/TaskE07/test.in @@ -0,0 +1,7 @@ +* +** +*** +*********** +*a ++ +a* diff --git a/TaskE08/description.txt b/TaskE08/description.txt new file mode 100644 index 0000000..8d9ca30 --- /dev/null +++ b/TaskE08/description.txt @@ -0,0 +1,38 @@ +Chichot +======= + +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 chichotem tzn. "hi" +powtórzonym przynajmniej 2 razy, po czym 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 given string consists of a sequence +"hi" repeated at least 2 times followed by optional sequences 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 10 z resztą 8. + +Attention. The task is for students whose students id remainder of the division by 10 is 8. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 8/10 diff --git a/TaskE08/test.exp b/TaskE08/test.exp new file mode 100644 index 0000000..8130ffc --- /dev/null +++ b/TaskE08/test.exp @@ -0,0 +1,10 @@ +no +no +no +no +yes +yes +yes +yes +yes +no diff --git a/TaskE08/test.in b/TaskE08/test.in new file mode 100644 index 0000000..810cbf6 --- /dev/null +++ b/TaskE08/test.in @@ -0,0 +1,10 @@ +!!!!! +!hi +hi +hi!!! +hihi +hihi!!!!!!!!! +hihihi +hihihi! +hihihihihihihihi +ih! diff --git a/TaskE09/description.txt b/TaskE09/description.txt new file mode 100644 index 0000000..deda462 --- /dev/null +++ b/TaskE09/description.txt @@ -0,0 +1,36 @@ +Wielka litera i dwie cyfry w środku +=================================== + +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 zawiera podciąg składający +się z wielkiej litery i dwóch 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 given string contains a substring +consisting of the capital letter and two digits. +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 10 z resztą 9. + +Attention. The task is for students whose students id remainder of the division by 10 is 9. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 9/10 diff --git a/TaskE09/test.exp b/TaskE09/test.exp new file mode 100644 index 0000000..f7854b9 --- /dev/null +++ b/TaskE09/test.exp @@ -0,0 +1,9 @@ +yes +no +no +yes +no +no +no +yes +yes diff --git a/TaskE09/test.in b/TaskE09/test.in new file mode 100644 index 0000000..fc29212 --- /dev/null +++ b/TaskE09/test.in @@ -0,0 +1,9 @@ +G3923d +G9 +Ha3a5 +Z00 +Z0x0 +az33a +dsdg34 +hahaA39dsdsd +sssssssssssU23 diff --git a/TaskE10/description.txt b/TaskE10/description.txt new file mode 100644 index 0000000..4e3fbfd --- /dev/null +++ b/TaskE10/description.txt @@ -0,0 +1,37 @@ +Podzielność liczby wystąpień +============================ + +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 jest potęgą liczby 2 +zapisaną w systemie szesnastkowym. 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 is a power of 2 written in the hexadecimal system. +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ą 10. + +Attention. The task is for students whose students id remainder of the division by 27 is 10. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 10/27 diff --git a/TaskE10/test.exp b/TaskE10/test.exp new file mode 100644 index 0000000..14bf667 --- /dev/null +++ b/TaskE10/test.exp @@ -0,0 +1,12 @@ +no +no +no +yes +yes +yes +no +no +yes +yes +no +no diff --git a/TaskE10/test.in b/TaskE10/test.in new file mode 100644 index 0000000..ab8d16e --- /dev/null +++ b/TaskE10/test.in @@ -0,0 +1,12 @@ +0 +0008000 +08000 +1 +2 +400 +400 400 +4020 +8000 +800000 +8888 +A0 diff --git a/TaskE11/description.txt b/TaskE11/description.txt new file mode 100644 index 0000000..c8e49d5 --- /dev/null +++ b/TaskE11/description.txt @@ -0,0 +1,40 @@ +Podzielność przez cztery +======================== + +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 - zapisany +dziesiętnie bądź szesnastkowo jest podzielny przez 4. Zapis szesnastkowy +jest sygnalizowany przez prefiks "0x", cyfry szesnastkowe zapisywane jako +wielkie litery. 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 (written in hexadecimal +or decimal system) is divisible by 4. A hexadecimal number +is prefixed by "0x" and hexadecimal letters are capital letters. +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ą 11. + +Attention. The task is for students whose students id remainder of the division by 27 is 11. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 11/27 diff --git a/TaskE11/test.exp b/TaskE11/test.exp new file mode 100644 index 0000000..16e3e7e --- /dev/null +++ b/TaskE11/test.exp @@ -0,0 +1,17 @@ +yes +no +yes +no +no +no +yes +no +yes +no +yes +yes +no +yes +yes +no +yes diff --git a/TaskE11/test.in b/TaskE11/test.in new file mode 100644 index 0000000..e01d67c --- /dev/null +++ b/TaskE11/test.in @@ -0,0 +1,17 @@ +0 +088 +0x0 +0x00B +0x00C +0x2 +0x34 +0xB +0xC +1 +100000 +16 +34 +34536 +4 +4 4 +88 diff --git a/TaskE12/description.txt b/TaskE12/description.txt new file mode 100644 index 0000000..7af8dac --- /dev/null +++ b/TaskE12/description.txt @@ -0,0 +1,38 @@ +Nie 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 numerem telefonu +zapisanym w formacie N-NNN-NNNNN-NNNN (N to dowolna cyfra), innym niż numer +telefonu 1-500-56773-4323. +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 is a phone number +wirtten in N-NNN-NNNNN-NNNN format (N is any digit), other than +1-500-56773-4323 phone number. +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ą 12. + +Attention. The task is for students whose students id remainder of the division by 27 is 12. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 12/27 diff --git a/TaskE12/test.exp b/TaskE12/test.exp new file mode 100644 index 0000000..f8af587 --- /dev/null +++ b/TaskE12/test.exp @@ -0,0 +1,6 @@ +no +yes +yes +no +yes +yes diff --git a/TaskE12/test.in b/TaskE12/test.in new file mode 100644 index 0000000..ec41c84 --- /dev/null +++ b/TaskE12/test.in @@ -0,0 +1,6 @@ +09-333-56773-4324 +1-500-00000-0000 +1-500-55773-4323 +1-500-56773-4323 +1-500-56773-4324 +9-333-56773-4324 diff --git a/TaskE13/description.txt b/TaskE13/description.txt new file mode 100644 index 0000000..b88fd0d --- /dev/null +++ b/TaskE13/description.txt @@ -0,0 +1,42 @@ +Nie koński łeb 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 jest napisem złożonym z +ciągu 5 wielkich liter i 4 wielkich liter oddzielonych spacją, które +wstukane na standardowym telefonie dadzą inny numer niż uzyskane przez +wstukanie 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 given string consists of +5 capital letters and 4 capital letter separated by space, +which written in old cellphone keyboard shows another number than typing +"HORSE HEAD". We assume standard old cellphone 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ą 13. + +Attention. The task is for students whose students id remainder of the division by 27 is 13. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 13/27 diff --git a/TaskE13/test.exp b/TaskE13/test.exp new file mode 100644 index 0000000..e09e7fc --- /dev/null +++ b/TaskE13/test.exp @@ -0,0 +1,9 @@ +no +yes +no +no +no +yes +no +yes +no diff --git a/TaskE13/test.in b/TaskE13/test.in new file mode 100644 index 0000000..7f9df30 --- /dev/null +++ b/TaskE13/test.in @@ -0,0 +1,9 @@ +0MORSE HEAD +AAAAA BBBB +AAAAAA BBBB +GOSRE IDAD +HORSE HEAD +MORSE HEAD +MORSEHEAD +ZOSRE IDAD +morse head diff --git a/TaskE14/description.txt b/TaskE14/description.txt new file mode 100644 index 0000000..3c4e16d --- /dev/null +++ b/TaskE14/description.txt @@ -0,0 +1,38 @@ +Nie 555 +======= + +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 9-cyfrowym numerem +telefonu zapisanym w formacie "NNN-NNN-NNN" badź "NNN NNN NNN" +niezaczynającym sie od kombinacji "555". +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 number is 9 digit phone +number written in "NNN-NNN-NNN" or "NNN NNN NNN" format, +which does not start with "555" +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ą 14. + +Attention. The task is for students whose students id remainder of the division by 27 is 14. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 14/27 diff --git a/TaskE14/test.exp b/TaskE14/test.exp new file mode 100644 index 0000000..ed8b658 --- /dev/null +++ b/TaskE14/test.exp @@ -0,0 +1,7 @@ +yes +yes +yes +no +yes +no +no diff --git a/TaskE14/test.in b/TaskE14/test.in new file mode 100644 index 0000000..ae3eec2 --- /dev/null +++ b/TaskE14/test.in @@ -0,0 +1,7 @@ +055-555-555 +505-324-555 +551-233-455 +555-123-456 +556 345 667 +556 345 6675 +556 345-667 diff --git a/TaskE15/description.txt b/TaskE15/description.txt new file mode 100644 index 0000000..44af9b3 --- /dev/null +++ b/TaskE15/description.txt @@ -0,0 +1,40 @@ +Wynik-zwycięstwo +================ + +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 bądź minusem), przy czym +pierwsza liczba jest większa od drugiej. Maksymalna liczba bramek +zwycięskiej drużyny wynosi 11. +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 +a soccer match result (two numbers separated by colon or minus character). +The first number should be greater than the second. +The maximum number of leading team is 11. +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ą 15. + +Attention. The task is for students whose students id remainder of the division by 27 is 15. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 15/27 diff --git a/TaskE15/test.exp b/TaskE15/test.exp new file mode 100644 index 0000000..2287cf2 --- /dev/null +++ b/TaskE15/test.exp @@ -0,0 +1,12 @@ +no +yes +yes +no +no +yes +no +yes +yes +no +no +yes diff --git a/TaskE15/test.in b/TaskE15/test.in new file mode 100644 index 0000000..17c02f2 --- /dev/null +++ b/TaskE15/test.in @@ -0,0 +1,12 @@ +10-10 +10-9 +11-10 +11-11 +12:0 +2:1 +2:5 +3-1 +5:2 +5:2 3:1 +5:21 +7-0 diff --git a/TaskE16/description.txt b/TaskE16/description.txt new file mode 100644 index 0000000..3fead0b --- /dev/null +++ b/TaskE16/description.txt @@ -0,0 +1,41 @@ +Równanie +======== + +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 proste równanie +typu "A @ B = C", gdzie w miejscu A, B, C mogą pojawić się liczby dodatnie +(bez nieznaczących zer) bądź zmienna "x" (zmienna "x" - dokładnie jeden raz +w całym równaniu. '@' którąś z operacji - '+', '-', '*', '/'. Operatory +arytmetyczne i równości mogą być otoczone przez spacje. +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 "A @ B = C" equation, +where A, B, C are positive integers (no leading zeros) or "x" variable (only +one "x" in the queation). "@" is of on '+', '-', '*', '/' operators. +Arithmetic operators may be separated by spaces. +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ą 16. + +Attention. The task is for students whose students id remainder of the division by 27 is 16. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 16/27 diff --git a/TaskE16/test.exp b/TaskE16/test.exp new file mode 100644 index 0000000..9723f86 --- /dev/null +++ b/TaskE16/test.exp @@ -0,0 +1,8 @@ +yes +no +no +yes +yes +yes +no +yes diff --git a/TaskE16/test.in b/TaskE16/test.in new file mode 100644 index 0000000..5e5b36b --- /dev/null +++ b/TaskE16/test.in @@ -0,0 +1,8 @@ +14 / x = 2 +2 + 2 + x = 8 +2 + 2 = 4 +2 + x = 4 +23 - x=13 +5+2=x +x + x = 16 +x* 343=90900 diff --git a/TaskE17/description.txt b/TaskE17/description.txt new file mode 100644 index 0000000..53eb408 --- /dev/null +++ b/TaskE17/description.txt @@ -0,0 +1,39 @@ +Formy czasownika +================ + +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 formą czasownika +zakończonego na "ować". Należy uwzględnić wszystkie formy z wyjątkiem +imiesłowów. Napis musi być ciągiem małych liter (włącznie z polskimi +literami). +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 verb ending with "ować". +You should include all forms, but a participle. The string should +be a sequence of lower case letters (including polish 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ą 17. + +Attention. The task is for students whose students id remainder of the division by 27 is 17. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 17/27 diff --git a/TaskE17/test.exp b/TaskE17/test.exp new file mode 100644 index 0000000..ae6065c --- /dev/null +++ b/TaskE17/test.exp @@ -0,0 +1,10 @@ +no +yes +no +yes +yes +yes +no +yes +yes +yes diff --git a/TaskE17/test.in b/TaskE17/test.in new file mode 100644 index 0000000..d3c3e4d --- /dev/null +++ b/TaskE17/test.in @@ -0,0 +1,10 @@ +Abonować +abonować +abonowaćxxx +anonsuje +anonsuję +modemowałyście +prowokowany +prowokuj +sprowokuje +óęererłujemy diff --git a/TaskE18/description.txt b/TaskE18/description.txt new file mode 100644 index 0000000..44e5356 --- /dev/null +++ b/TaskE18/description.txt @@ -0,0 +1,41 @@ +Numer wiersza z Ewangelii +========================= + +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 oznaczeniem wiersza z +Ewangelii (w rodzaju "Mt 17, 3"). Skróty Ewangelii - "Mt", "Mk", "Łk", "J", +liczba rozdziałów odpowiednio - 28, 16, 24, 22. Wiersz liczba z zakresu +1-99 (nie trzeba sprawdzać czy faktycznie tyle jest w poszczególnych +rozdziałach). +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 Evangel line number +(like "Mt 17, 3"). Evangel abbreviations - "Mt", "Mk", "Łk", "J", +paragraphs numbers correspondingly 28, 16, 24, 22. Verset name is 1-99. +You don't need to check if there are such versets in the real Evangel. +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ą 18. + +Attention. The task is for students whose students id remainder of the division by 27 is 18. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 18/27 diff --git a/TaskE18/test.exp b/TaskE18/test.exp new file mode 100644 index 0000000..011a93e --- /dev/null +++ b/TaskE18/test.exp @@ -0,0 +1,8 @@ +yes +no +yes +no +yes +yes +yes +no diff --git a/TaskE18/test.in b/TaskE18/test.in new file mode 100644 index 0000000..02d5558 --- /dev/null +++ b/TaskE18/test.in @@ -0,0 +1,8 @@ +J 22, 99 +J 23, 1 +Mk 16, 9 +Mk 17, 9 +Mk 7, 9 +Mt 1, 1 +Łk 24, 3 +Łk 30, 1 diff --git a/TaskE19/description.txt b/TaskE19/description.txt new file mode 100644 index 0000000..26d0474 --- /dev/null +++ b/TaskE19/description.txt @@ -0,0 +1,35 @@ +Potęga setki +============ + +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 jest potęgą liczby +100. +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 is the power of 100. +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ą 19. + +Attention. The task is for students whose students id remainder of the division by 27 is 19. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 19/27 diff --git a/TaskE19/test.exp b/TaskE19/test.exp new file mode 100644 index 0000000..889c90d --- /dev/null +++ b/TaskE19/test.exp @@ -0,0 +1,9 @@ +no +yes +no +yes +yes +yes +no +no +no diff --git a/TaskE19/test.in b/TaskE19/test.in new file mode 100644 index 0000000..de73392 --- /dev/null +++ b/TaskE19/test.in @@ -0,0 +1,9 @@ +-100 +1 +10 +100 +10000 +1000000 +1001 +2000 +500 diff --git a/TaskE20/description.txt b/TaskE20/description.txt new file mode 100644 index 0000000..cfd24e5 --- /dev/null +++ b/TaskE20/description.txt @@ -0,0 +1,36 @@ +Numer telefonu +============== + +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ć zadany napis jest numerem telefonu. +Zakładamy, że numer telefonu składa się z dwóch cyfr opcjonalnie +poprzedzonych zerem, po których następuje spacja i 7 cyfr w formacie +N-NNN-NNN. Jeśli napis nie spełnia podanych warunków, należy wypisać +"". + +For each string, extract a phone number. We assume, that the phone +number consists of two digits (optionally prefixed by zero), followed +by space and 7 digits in N-NNN-NNN format. If the string does +not fulfill the condition, print "". + +UWAGA! Zadanie przeznaczone dla studentów, których numer indeksu +dzieli się przez 27 z resztą 20. + +Attention. The task is for students whose students id remainder of the division by 27 is 20. + +POINTS: 1 +DEADLINE: 2023-12-10 23:59:59 +REMAINDER: 20/27 diff --git a/TaskE20/test.exp b/TaskE20/test.exp new file mode 100644 index 0000000..1ecdcc9 --- /dev/null +++ b/TaskE20/test.exp @@ -0,0 +1,6 @@ +yes +yes +no +yes +yes +no diff --git a/TaskE20/test.in b/TaskE20/test.in new file mode 100644 index 0000000..7959711 --- /dev/null +++ b/TaskE20/test.in @@ -0,0 +1,6 @@ +00 0-000-000 +000 0-000-000 +0000 0-000-000 +061 5-555-553 +61 5-555-553 +61 5-555-5534 diff --git a/TaskE21/description.txt b/TaskE21/description.txt new file mode 100644 index 0000000..65f152d --- /dev/null +++ b/TaskE21/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 21/27 diff --git a/TaskE21/test.exp b/TaskE21/test.exp new file mode 100644 index 0000000..1fae3c6 --- /dev/null +++ b/TaskE21/test.exp @@ -0,0 +1,9 @@ +no +no +no +yes +yes +no +no +no +no diff --git a/TaskE21/test.in b/TaskE21/test.in new file mode 100644 index 0000000..7f9df30 --- /dev/null +++ b/TaskE21/test.in @@ -0,0 +1,9 @@ +0MORSE HEAD +AAAAA BBBB +AAAAAA BBBB +GOSRE IDAD +HORSE HEAD +MORSE HEAD +MORSEHEAD +ZOSRE IDAD +morse head diff --git a/TaskE22/description.txt b/TaskE22/description.txt new file mode 100644 index 0000000..0d4addf --- /dev/null +++ b/TaskE22/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 22/27 diff --git a/TaskE22/test.exp b/TaskE22/test.exp new file mode 100644 index 0000000..6872505 --- /dev/null +++ b/TaskE22/test.exp @@ -0,0 +1,11 @@ +yes +yes +no +yes +no +no +no +yes +yes +no +no diff --git a/TaskE22/test.in b/TaskE22/test.in new file mode 100644 index 0000000..7bc2e91 --- /dev/null +++ b/TaskE22/test.in @@ -0,0 +1,11 @@ +0:7 +10:10 +11:2 +2:1 +3 +3:101 +5-5 +5:2 +5:5 +:3 +xxxx diff --git a/TaskE23/description.txt b/TaskE23/description.txt new file mode 100644 index 0000000..5453587 --- /dev/null +++ b/TaskE23/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 23/27 diff --git a/TaskE23/test.exp b/TaskE23/test.exp new file mode 100644 index 0000000..f3de7ec --- /dev/null +++ b/TaskE23/test.exp @@ -0,0 +1,14 @@ +yes +no +yes +no +yes +no +yes +no +yes +yes +yes +yes +yes +yes diff --git a/TaskE23/test.in b/TaskE23/test.in new file mode 100644 index 0000000..80c3386 --- /dev/null +++ b/TaskE23/test.in @@ -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 diff --git a/TaskE24/description.txt b/TaskE24/description.txt new file mode 100644 index 0000000..93cd703 --- /dev/null +++ b/TaskE24/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 24/27 diff --git a/TaskE24/test.exp b/TaskE24/test.exp new file mode 100644 index 0000000..3aca048 --- /dev/null +++ b/TaskE24/test.exp @@ -0,0 +1,8 @@ +no +yes +yes +yes +yes +no +yes +yes diff --git a/TaskE24/test.in b/TaskE24/test.in new file mode 100644 index 0000000..b969393 --- /dev/null +++ b/TaskE24/test.in @@ -0,0 +1,8 @@ +Aa Ax +Ai Oi +Atanazy Bazakbal +Ax Aa +Jan Maska +Joanna Kowalska +Kim Bo +Oo Oo diff --git a/TaskE25/description.txt b/TaskE25/description.txt new file mode 100644 index 0000000..b1d0042 --- /dev/null +++ b/TaskE25/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 25/27 diff --git a/TaskE25/test.exp b/TaskE25/test.exp new file mode 100644 index 0000000..d18b57f --- /dev/null +++ b/TaskE25/test.exp @@ -0,0 +1,9 @@ +yes +no +no +no +no +yes +no +no +yes diff --git a/TaskE25/test.in b/TaskE25/test.in new file mode 100644 index 0000000..b516734 --- /dev/null +++ b/TaskE25/test.in @@ -0,0 +1,9 @@ +Aa Ax +Ai Oi +Atanazy Bazakbal +Ax Aa +Jan Maska +Joanna Kowalska +Kim Bo +Oo Oo +Za Mysz diff --git a/TaskE26/description.txt b/TaskE26/description.txt new file mode 100644 index 0000000..208b2a1 --- /dev/null +++ b/TaskE26/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 26/27 diff --git a/TaskE26/test.exp b/TaskE26/test.exp new file mode 100644 index 0000000..a119ccf --- /dev/null +++ b/TaskE26/test.exp @@ -0,0 +1,11 @@ +no +yes +no +yes +yes +yes +no +no +yes +yes +yes diff --git a/TaskE26/test.in b/TaskE26/test.in new file mode 100644 index 0000000..2d3e46a --- /dev/null +++ b/TaskE26/test.in @@ -0,0 +1,11 @@ ++0 ++5 +-0 +-11110 +-5 +0 +03434343435 +06 +100 +3434343435 +5 diff --git a/TaskE27/description.txt b/TaskE27/description.txt new file mode 100644 index 0000000..37be13a --- /dev/null +++ b/TaskE27/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 0/27 diff --git a/TaskE27/test.exp b/TaskE27/test.exp new file mode 100644 index 0000000..84d3313 --- /dev/null +++ b/TaskE27/test.exp @@ -0,0 +1,13 @@ +no +yes +no +no +no +yes +yes +yes +no +no +yes +yes +yes diff --git a/TaskE27/test.in b/TaskE27/test.in new file mode 100644 index 0000000..8e7ff6e --- /dev/null +++ b/TaskE27/test.in @@ -0,0 +1,13 @@ +-1 +0 +05 +098 +1000 +103 +139 +142 +143 +144 +5 +78 +99 diff --git a/TaskE28/description.txt b/TaskE28/description.txt new file mode 100644 index 0000000..792aca5 --- /dev/null +++ b/TaskE28/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 1/27 diff --git a/TaskE28/test.exp b/TaskE28/test.exp new file mode 100644 index 0000000..f7173db --- /dev/null +++ b/TaskE28/test.exp @@ -0,0 +1,9 @@ +yes +no +no +no +yes +yes +no +yes +yes diff --git a/TaskE28/test.in b/TaskE28/test.in new file mode 100644 index 0000000..24a228f --- /dev/null +++ b/TaskE28/test.in @@ -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 diff --git a/TaskE29/description.txt b/TaskE29/description.txt new file mode 100644 index 0000000..652e515 --- /dev/null +++ b/TaskE29/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 2/27 diff --git a/TaskE29/test.exp b/TaskE29/test.exp new file mode 100644 index 0000000..d028414 --- /dev/null +++ b/TaskE29/test.exp @@ -0,0 +1,11 @@ +no +no +no +yes +yes +yes +yes +yes +yes +yes +yes diff --git a/TaskE29/test.in b/TaskE29/test.in new file mode 100644 index 0000000..be18d77 --- /dev/null +++ b/TaskE29/test.in @@ -0,0 +1,11 @@ +%haha% +0zmienna +2 +Gitorah +_2 +_____ +_a_ +blo_34a +godzilla +x +z0000000 diff --git a/TaskE30/description.txt b/TaskE30/description.txt new file mode 100644 index 0000000..384ec0a --- /dev/null +++ b/TaskE30/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 3/27 diff --git a/TaskE30/test.exp b/TaskE30/test.exp new file mode 100644 index 0000000..dfcda72 --- /dev/null +++ b/TaskE30/test.exp @@ -0,0 +1,11 @@ +no +yes +yes +no +yes +yes +no +yes +yes +no +yes diff --git a/TaskE30/test.in b/TaskE30/test.in new file mode 100644 index 0000000..a9b264d --- /dev/null +++ b/TaskE30/test.in @@ -0,0 +1,11 @@ +-200 +-21 +-49 +-50 +-9 +0 +100 +18 +49 +50 +7 diff --git a/TaskE31/description.txt b/TaskE31/description.txt new file mode 100644 index 0000000..46cb178 --- /dev/null +++ b/TaskE31/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 4/27 diff --git a/TaskE31/test.exp b/TaskE31/test.exp new file mode 100644 index 0000000..ffc3117 --- /dev/null +++ b/TaskE31/test.exp @@ -0,0 +1,9 @@ +no +no +yes +no +no +no +yes +no +yes diff --git a/TaskE31/test.in b/TaskE31/test.in new file mode 100644 index 0000000..6547367 --- /dev/null +++ b/TaskE31/test.in @@ -0,0 +1,9 @@ +223 +aa +dom +html +ostrach +puko +strach +strachy +u diff --git a/TaskE32/description.txt b/TaskE32/description.txt new file mode 100644 index 0000000..a5f1c4b --- /dev/null +++ b/TaskE32/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 5/27 diff --git a/TaskE32/test.exp b/TaskE32/test.exp new file mode 100644 index 0000000..c5c4817 --- /dev/null +++ b/TaskE32/test.exp @@ -0,0 +1,8 @@ +no +no +yes +yes +yes +yes +no +no diff --git a/TaskE32/test.in b/TaskE32/test.in new file mode 100644 index 0000000..6bb5f1c --- /dev/null +++ b/TaskE32/test.in @@ -0,0 +1,8 @@ +$ +$0098 +$1 +$100 +$67592234 +$89 +10$100 +89 diff --git a/TaskE33/description.txt b/TaskE33/description.txt new file mode 100644 index 0000000..afc152e --- /dev/null +++ b/TaskE33/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 6/27 diff --git a/TaskE33/test.exp b/TaskE33/test.exp new file mode 100644 index 0000000..a8b30d2 --- /dev/null +++ b/TaskE33/test.exp @@ -0,0 +1,10 @@ +no +yes +yes +yes +yes +yes +no +no +yes +no diff --git a/TaskE33/test.in b/TaskE33/test.in new file mode 100644 index 0000000..240da6d --- /dev/null +++ b/TaskE33/test.in @@ -0,0 +1,10 @@ +89 +AAAAA +AGCTTGGAAACT +AGCUUGGAAACU +G +TAT +TAU +UAT +UAU +aaa diff --git a/TaskE34/description.txt b/TaskE34/description.txt new file mode 100644 index 0000000..e47a9dd --- /dev/null +++ b/TaskE34/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 7/27 diff --git a/TaskE34/test.exp b/TaskE34/test.exp new file mode 100644 index 0000000..ef66c4e --- /dev/null +++ b/TaskE34/test.exp @@ -0,0 +1,11 @@ +no +no +no +yes +yes +no +no +yes +yes +no +no diff --git a/TaskE34/test.in b/TaskE34/test.in new file mode 100644 index 0000000..5f2634e --- /dev/null +++ b/TaskE34/test.in @@ -0,0 +1,11 @@ +ahmmmm..... +hhmmm..... +hm..... +hmm +hmm... +hmmm. +hmmm.. +hmmm.... +hmmmm...... +hmmmm.....?! +mmm.... diff --git a/TaskE35/description.txt b/TaskE35/description.txt new file mode 100644 index 0000000..24c5fc9 --- /dev/null +++ b/TaskE35/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 8/27 diff --git a/TaskE35/test.exp b/TaskE35/test.exp new file mode 100644 index 0000000..9481e7f --- /dev/null +++ b/TaskE35/test.exp @@ -0,0 +1,8 @@ +no +yes +yes +yes +no +yes +no +no diff --git a/TaskE35/test.in b/TaskE35/test.in new file mode 100644 index 0000000..cb6f172 --- /dev/null +++ b/TaskE35/test.in @@ -0,0 +1,8 @@ +!!lala!! +lala +lilala!!! +lilili!!!! +lol +lololali! +luli +ola! diff --git a/TaskE36/description.txt b/TaskE36/description.txt new file mode 100644 index 0000000..9c23006 --- /dev/null +++ b/TaskE36/description.txt @@ -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 "", jeśli podany napis nie jest godziną. Jeśli napis +nie spełnia podanych warunków, należy wypisać "". + +For each string, extract the minutes from the given string represented +by time in "9:13", "18:44" format. The function should return "" +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: 2023-12-10 23:59:59 +REMAINDER: 9/27 diff --git a/TaskE36/test.exp b/TaskE36/test.exp new file mode 100644 index 0000000..d107194 --- /dev/null +++ b/TaskE36/test.exp @@ -0,0 +1,7 @@ +00 +44 +59 + +13 + + diff --git a/TaskE36/test.in b/TaskE36/test.in new file mode 100644 index 0000000..f51fd3b --- /dev/null +++ b/TaskE36/test.in @@ -0,0 +1,7 @@ +0:00 +18:44 +23:59 +25:14 +9:13 +9:61 +x9:13y diff --git a/TaskE37/description.txt b/TaskE37/description.txt new file mode 100644 index 0000000..ebd38d6 --- /dev/null +++ b/TaskE37/description.txt @@ -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ć +"". + +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 "". + +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: 2023-12-10 23:59:59 +REMAINDER: 2/7 diff --git a/TaskE37/test.exp b/TaskE37/test.exp new file mode 100644 index 0000000..483e86e --- /dev/null +++ b/TaskE37/test.exp @@ -0,0 +1,9 @@ + +61 +61 +61 +61 +82 + + + diff --git a/TaskE37/test.in b/TaskE37/test.in new file mode 100644 index 0000000..ba81aec --- /dev/null +++ b/TaskE37/test.in @@ -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 diff --git a/TaskE38/description.txt b/TaskE38/description.txt new file mode 100644 index 0000000..7338f71 --- /dev/null +++ b/TaskE38/description.txt @@ -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ć "". + +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 "". + +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: 2023-12-10 23:59:59 +REMAINDER: 3/7 diff --git a/TaskE38/test.exp b/TaskE38/test.exp new file mode 100644 index 0000000..7c42ac6 --- /dev/null +++ b/TaskE38/test.exp @@ -0,0 +1,7 @@ +11 + + + +34 + +7 diff --git a/TaskE38/test.in b/TaskE38/test.in new file mode 100644 index 0000000..4057c5a --- /dev/null +++ b/TaskE38/test.in @@ -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 diff --git a/TaskE39/description.txt b/TaskE39/description.txt new file mode 100644 index 0000000..b8e4c7d --- /dev/null +++ b/TaskE39/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 4/7 diff --git a/TaskE39/test.exp b/TaskE39/test.exp new file mode 100644 index 0000000..828c955 --- /dev/null +++ b/TaskE39/test.exp @@ -0,0 +1,12 @@ +no +yes +no +yes +yes +yes +no +yes +yes +yes +no +no diff --git a/TaskE39/test.in b/TaskE39/test.in new file mode 100644 index 0000000..6df0c12 --- /dev/null +++ b/TaskE39/test.in @@ -0,0 +1,12 @@ +000000 +012345 +1111 +111201 +112130 +121144 +12345 +211301 +465542 +707871 +888800 +WTF diff --git a/TaskE40/description.txt b/TaskE40/description.txt new file mode 100644 index 0000000..cb4c6fe --- /dev/null +++ b/TaskE40/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 5/7 diff --git a/TaskE40/test.exp b/TaskE40/test.exp new file mode 100644 index 0000000..b84e54c --- /dev/null +++ b/TaskE40/test.exp @@ -0,0 +1,18 @@ +yes +yes +no +yes +yes +yes +no +yes +no +yes +no +yes +yes +no +yes +yes +yes +no diff --git a/TaskE40/test.in b/TaskE40/test.in new file mode 100644 index 0000000..d105517 --- /dev/null +++ b/TaskE40/test.in @@ -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 diff --git a/TaskE41/description.txt b/TaskE41/description.txt new file mode 100644 index 0000000..94728fb --- /dev/null +++ b/TaskE41/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 6/7 diff --git a/TaskE41/test.exp b/TaskE41/test.exp new file mode 100644 index 0000000..d023fdc --- /dev/null +++ b/TaskE41/test.exp @@ -0,0 +1,19 @@ +no +yes +yes +yes +yes +yes +no +yes +no +no +yes +no +yes +yes +yes +yes +yes +yes +no diff --git a/TaskE41/test.in b/TaskE41/test.in new file mode 100644 index 0000000..78d2f50 --- /dev/null +++ b/TaskE41/test.in @@ -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 diff --git a/TaskE42/description.txt b/TaskE42/description.txt new file mode 100644 index 0000000..9b84a61 --- /dev/null +++ b/TaskE42/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 0/7 diff --git a/TaskE42/test.exp b/TaskE42/test.exp new file mode 100644 index 0000000..c69eeab --- /dev/null +++ b/TaskE42/test.exp @@ -0,0 +1,7 @@ +no +yes +no +yes +yes +no +no diff --git a/TaskE42/test.in b/TaskE42/test.in new file mode 100644 index 0000000..2a256b5 --- /dev/null +++ b/TaskE42/test.in @@ -0,0 +1,7 @@ +NIE!!!!!! +NIEEEEEE!!!! +NOOOO!!! +NOOOOOO!!! +NOOOOOOOOO!!!!!!! +NOOOOOOOOOOOOOOOO!! +xxxxNIEEEEEEEEEEEEEEEE!!!!!!!!!!! diff --git a/TaskE43/description.txt b/TaskE43/description.txt new file mode 100644 index 0000000..f8ea4ee --- /dev/null +++ b/TaskE43/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 1/7 diff --git a/TaskE43/test.exp b/TaskE43/test.exp new file mode 100644 index 0000000..e1ca228 --- /dev/null +++ b/TaskE43/test.exp @@ -0,0 +1,14 @@ +yes +no +yes +yes +yes +yes +no +yes +no +yes +no +no +yes +no diff --git a/TaskE43/test.in b/TaskE43/test.in new file mode 100644 index 0000000..8a8249b --- /dev/null +++ b/TaskE43/test.in @@ -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? diff --git a/TaskE44/description.txt b/TaskE44/description.txt new file mode 100644 index 0000000..f28d506 --- /dev/null +++ b/TaskE44/description.txt @@ -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ć "". Jeśli napis nie spełnia podanych warunków, należy wypisać +"". + +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 "". + +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: 2023-12-10 23:59:59 +REMAINDER: 4/5 diff --git a/TaskE44/test.exp b/TaskE44/test.exp new file mode 100644 index 0000000..800ef4c --- /dev/null +++ b/TaskE44/test.exp @@ -0,0 +1,14 @@ + +Kowalska +Długi + + + + + +Xa + + + +Żuraś + diff --git a/TaskE44/test.in b/TaskE44/test.in new file mode 100644 index 0000000..ce71fd3 --- /dev/null +++ b/TaskE44/test.in @@ -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ś diff --git a/TaskE45/description.txt b/TaskE45/description.txt new file mode 100644 index 0000000..e0303ba --- /dev/null +++ b/TaskE45/description.txt @@ -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ć "". + +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 "". + +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: 2023-12-10 23:59:59 +REMAINDER: 0/5 diff --git a/TaskE45/test.exp b/TaskE45/test.exp new file mode 100644 index 0000000..f85f720 --- /dev/null +++ b/TaskE45/test.exp @@ -0,0 +1,14 @@ + + + + +Nowak +Ścież +Źdźbło + +Xa + + + +Żuraś + diff --git a/TaskE45/test.in b/TaskE45/test.in new file mode 100644 index 0000000..ee25cf2 --- /dev/null +++ b/TaskE45/test.in @@ -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ś diff --git a/TaskE46/description.txt b/TaskE46/description.txt new file mode 100644 index 0000000..453aeab --- /dev/null +++ b/TaskE46/description.txt @@ -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ć "". + +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 "". + +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: 2023-12-10 23:59:59 +REMAINDER: 1/5 diff --git a/TaskE46/test.exp b/TaskE46/test.exp new file mode 100644 index 0000000..5e20d8f --- /dev/null +++ b/TaskE46/test.exp @@ -0,0 +1,13 @@ +w--www +Plik.txt + +tuxracer + +stronka.html + + + + +bla.txt + + diff --git a/TaskE46/test.in b/TaskE46/test.in new file mode 100644 index 0000000..4081c01 --- /dev/null +++ b/TaskE46/test.in @@ -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 diff --git a/TaskE47/description.txt b/TaskE47/description.txt new file mode 100644 index 0000000..b6c0149 --- /dev/null +++ b/TaskE47/description.txt @@ -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ć "". + +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 "". + +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: 2023-12-10 23:59:59 +REMAINDER: 2/5 diff --git a/TaskE47/test.exp b/TaskE47/test.exp new file mode 100644 index 0000000..6f9efd8 --- /dev/null +++ b/TaskE47/test.exp @@ -0,0 +1,5 @@ +#UFO +#a;#A;#PoKeMoN0 + + +#Rambo61;#Rocky9 diff --git a/TaskE47/test.in b/TaskE47/test.in new file mode 100644 index 0000000..89b1f56 --- /dev/null +++ b/TaskE47/test.in @@ -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. diff --git a/TaskE48/description.txt b/TaskE48/description.txt new file mode 100644 index 0000000..1ba2ee6 --- /dev/null +++ b/TaskE48/description.txt @@ -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: 2023-12-10 23:59:59 +REMAINDER: 3/5 diff --git a/TaskE48/test.exp b/TaskE48/test.exp new file mode 100644 index 0000000..66b9eca --- /dev/null +++ b/TaskE48/test.exp @@ -0,0 +1,12 @@ +no +no +yes +yes +yes +yes +no +no +no +yes +yes +yes diff --git a/TaskE48/test.in b/TaskE48/test.in new file mode 100644 index 0000000..69c154b --- /dev/null +++ b/TaskE48/test.in @@ -0,0 +1,12 @@ +2yĆó +POKEmon +PoKeMoN +RyĆó +oK +pOkEmOn +pokemon +y +Ć +ŹdŹbŁo +ŹlExSiĘ +źDźBłO diff --git a/run_report.py b/run_report.py index affae7a..e640595 100644 --- a/run_report.py +++ b/run_report.py @@ -58,7 +58,7 @@ def is_task_correct(dir): def does_task_match_index(dir, index): - with open(Path(dir, f'description.txt')) as f_in: + with open(Path(dir, f'description.txt'), encoding='UTF-8') as f_in: lines = f_in.readlines() remainder_lines = [x for x in lines if x.startswith('REMAINDER')] if len(remainder_lines) == 0: