AcWing 663. 简单排序 Python3
原题链接
中等
作者:
sE@_0tT3r
,
2021-04-14 10:28:43
,
所有人可见
,
阅读 392
Python3 代码
x,y,z = input().split()
x = eval(x)
y = eval(y)
z = eval(z)
if x >= y and x >= z:
greatest = x
if y > z:
middle = y
smallest = z
else:
middle = z
smallest = y
elif y >= x and y >= z:
greatest = y
if x > z:
middle = x
smallest = z
else:
middle = z
smallest = x
else:
greatest = z
if y > x:
middle = y
smallest = x
else:
middle = x
smallest = y
print(smallest)
print(middle)
print(greatest)
print(" ")
print(x)
print(y)
print(z)