D 1st part
This commit is contained in:
parent
cb8cc58687
commit
7e2f648575
8
.idea/.gitignore
vendored
Normal file
8
.idea/.gitignore
vendored
Normal 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/
|
8
.idea/djfz-2020-s444507.iml
Normal file
8
.idea/djfz-2020-s444507.iml
Normal 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>
|
6
.idea/inspectionProfiles/profiles_settings.xml
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
Normal 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
7
.idea/misc.xml
Normal 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
8
.idea/modules.xml
Normal 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
6
.idea/vcs.xml
Normal 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
0
TaskD00/Makefile
Normal file
2
TaskD00/run
Normal file
2
TaskD00/run
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
python TaskD00/run.py "$@"
|
15
TaskD00/run.py
Normal file
15
TaskD00/run.py
Normal 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
0
TaskD01/Makefile
Normal file
2
TaskD01/run
Normal file
2
TaskD01/run
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
python TaskD01/run.py "$@"
|
14
TaskD01/run.py
Normal file
14
TaskD01/run.py
Normal 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'))
|
@ -1,3 +1,4 @@
|
||||
ala Ma kotA
|
||||
lallaa
|
||||
Żuk
|
||||
lallaa
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user