← Back to List

25933번: Medal Ranking ↗

Solutions

Python 3
354 B | 354 chars
for i in range(int(input())):
  l = [*map(int, input().split())]
  
  t = 0
  
  if l[0] + l[1] + l[2] > l[3] + l[4] + l[5]:
    t |= 1
  
  if l[0] > l[3]:
    t |= 2
  elif l[0] == l[3]:
    if l[1] > l[4]:
      t |= 2
    elif l[1] == l[4]:
      if l[2] > l[5]:
        t |= 2
  
  print(*l)
  print(["none", "count", "color", "both"][t])
  print()