← Back to List

12033번: 김인천씨의 식료품가게 (Small) ↗

Solutions

Python 3
247 B | 247 chars
for t in range(int(input())):
    n=int(input())
    L=list(map(int,input().split()))
    L.sort()
    print("Case #{}: ".format(t+1),end="")
    for i in L:
        print(i,end=" ")
        if i*4//3 in L:
            L.remove(i*4//3)
    print()