# первое
def bymax(*x):
print(*sorted(x))
# второе
def nod(a, b):
while a != 0 and b != 0:
if a > b:
a %= b
else:
b %= a
print(a + b)
# третье
def sign(x):
if x == 0:
return 0
elif x > 0:
return 1
else
return -1
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
# первое
def bymax(*x):
print(*sorted(x))
# второе
def nod(a, b):
while a != 0 and b != 0:
if a > b:
a %= b
else:
b %= a
print(a + b)
# третье
def sign(x):
if x == 0:
return 0
elif x > 0:
return 1
else
return -1