#32053: python 四行解(就真的把程式碼都壓縮成一行)


wmouo (crazypanda)


a = int(input())
n = sorted([int(_) for _ in input().split(' ') if _])
print(' '.join(map(str,n)))
print(' '.join(map(str,sorted(list(set(n)),key = lambda x:-x))))
這個方式會比分開打慢一些,因為轉換的地方有些都重複,所以就只是一個中看不中用讓自己感覺很猛的程式 呵呵
#44323: Re: python 四行解(就真的把程式碼都壓縮成一行)


hansjiang1017@gmail.com (可以出題了!!!!!!!!!!!!!!!)


a = int(input())
n = sorted([int(_) for _ in input().split(' ') if _])
print(' '.join(map(str,n)))
print(' '.join(map(str,sorted(list(set(n)),key = lambda x:-x))))
這個方式會比分開打慢一些,因為轉換的地方有些都重複,所以就只是一個中看不中用讓自己感覺很猛的程式 呵呵

N = int(input())
nums = list(map(int, input().split()))
print(' '.join(list(map(str, sorted(nums)))))
print(' '.join(list(map(str, (sorted(set(nums), reverse = True))))))

我也寫了一個差不多的