python 典型的输入输出处理

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Lichengguang_std/article/details/81674371
while True:
    try:
        a,b,c=input(),map(int,input().split()),input()
        if c=='0':

            print(" ".join(map(str,sorted(b))))
        if c=='1':
            print(" ".join(map(str,sorted(b,reverse=True))))
    except:
        break

猜你喜欢

转载自blog.csdn.net/Lichengguang_std/article/details/81674371
今日推荐