first commit

This commit is contained in:
s464968 2024-10-19 20:16:04 +02:00
commit bc08f780b7
9 changed files with 72 additions and 0 deletions

8
1/.idea/.gitignore vendored Normal file
View File

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

8
1/.idea/1.iml Normal file
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
1/.idea/misc.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.12" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12" project-jdk-type="Python SDK" />
</project>

8
1/.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/1.iml" filepath="$PROJECT_DIR$/.idea/1.iml" />
</modules>
</component>
</project>

7
1/1.py Normal file
View File

@ -0,0 +1,7 @@
from gmpy2 import *
import random
k = int(input())
max_b = pow(2, k) - 1
b = mpz(random.randint(0, max_b))
print(b.__format__('#b'))

11
1/2.py Normal file
View File

@ -0,0 +1,11 @@
#TODO: DOKOŃCZYĆ
def nwd(a, b):
if b == 0:
return a, 1, 0
dzielnik,x,y = nwd(b,a%b)
returned_y = x - (x//y)*y
returned_x = y
return dzielnik,returned_x,returned_y
print(nwd(13.0,5.0))

17
1/3.py Normal file
View File

@ -0,0 +1,17 @@
from gmpy2 import *
a = input()
b = input()
a,b = mpz(a),mpz(b)
wynik = 1
baza = a
for i in range(0,b.bit_length()):
if b.bit_test(i):
wynik = wynik * baza
baza = baza * baza
print(wynik)

0
README.md Normal file
View File