1 solutions

  • 0
    @ 2024-12-25 9:08:40
    lst2 = []
    lst3 = []
    lst1 =[]
    for i in range(2):
        if i == 0:
            x = input().split()
            for j in x:
                lst1.append(int(j))
            lst1 = sorted(lst1)
        else:
            number = input()
    for i in number:
        lst2.append(i)
    
    for i in lst2:
        if i == 'A' :
            lst3.append(lst1[0])
        if i == 'B' :
            lst3.append(lst1[1])
        if i == 'C':
            lst3.append(lst1[2])
    for i ,j in enumerate(lst3):
        lst3[i] = str(j)
    output = ' '.join(lst3)
    print(output)
    

    Information

    ID
    534
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    9
    Tags
    # Submissions
    12
    Accepted
    3
    Uploaded By