Start: Nov, 12, 2017 10:00:00
2017秋Python程序设计基础培训第五次作业
End: Nov, 19, 2017 12:00:00
Time elapsed:
Time remaining:

Problem_ID: C
Result: Accepted
Time: 87ms
Memory: 24436kB
Author: jszxl
In contest: 1125

while True:
    try:
        n = int(input())
        if n == 0:break
        a = input().split()#输入一个串
        b = []
        for n in a:
            n = list(n)#将每个数字串分成单个数字字符转换为列表,
            n.sort()#对列表进行排序
            n = "".join(n)#将排序后的列表又合成一个数字串
            b.append(n)#将它添加到列表b
        c = []
        for i in range(len(a)):#遍历每个原串的每个字符串
            if b.count(b[i]) == 1:#如果重构的排序后的数字串只有一个
                c.append(int(a[i]))
        if len(c) == 0:
            print("None")
        else:
            c.sort()
            for n in c:
                print(n,end=" ")
            print("")

    except EOFError:
        break