解题思路:
注意事项:
参考代码:while True:
try:
array = list(map(int, input().split()))
array_odd = []
array_even = []
for i in array:
if i % 2 == 0:
array_even.append(i)
else:
array_odd.append(i)
array_odd.sort(reverse=True)
array_even.sort()
for i in array_odd:
print(i, end=' ')
for i in array_even:
print(i, end=' ')
print()
except:
break
0.0分
0 人评分