D 1st part

This commit is contained in:
Adam 2020-12-05 20:41:36 +01:00
parent cb8cc58687
commit 7e2f648575
13 changed files with 78 additions and 1 deletions

8
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

7
.idea/misc.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6 (ProjektAI)" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/djfz-2020-s444507.iml" filepath="$PROJECT_DIR$/.idea/djfz-2020-s444507.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

0
TaskD00/Makefile Normal file
View File

2
TaskD00/run Normal file
View File

@ -0,0 +1,2 @@
#!/bin/bash
python TaskD00/run.py "$@"

15
TaskD00/run.py Normal file
View File

@ -0,0 +1,15 @@
import re
import sys
def repl(char):
x = char.group(0)
output_str = ""
for c in x:
word_char = ord(c)
output = chr(int(word_char)+49)
output_str += output
return output_str
for line in sys.stdin:
print(re.sub(r'(\d{4})', repl, line).rstrip('\n'))

0
TaskD01/Makefile Normal file
View File

2
TaskD01/run Normal file
View File

@ -0,0 +1,2 @@
#!/bin/bash
python TaskD01/run.py "$@"

14
TaskD01/run.py Normal file
View File

@ -0,0 +1,14 @@
import re
import sys
def repl(char):
x = char.group(0)
output_str = ""
for c in x:
c = c.swapcase()
output_str += c
return output_str
for line in sys.stdin:
print(re.sub(r'\b[a-ząćęłńóśźż]+[A-ZĄĆĘŁŃÓŚŹŻ]+\b|\b[A-ZĄĆĘŁŃÓŚŹŻ]+[a-ząćęłńóśźż]+\b', repl, line).rstrip('\n'))

View File

@ -1,3 +1,4 @@
ala Ma kotA
lallaa
Żuk
lallaa