题解 | #扑克牌大小#
扑克牌大小
https://www.nowcoder.com/practice/d290db02bacc4c40965ac31d16b1c3eb
import sys L = "3 4 5 6 7 8 9 10 J Q K A 2 joker JOKER" for line in sys.stdin: s = line.split("-") a = s[0].split() b = s[1].split() out = [] if len(a) != len(b): if len(a) == 2 and "joker" in a: out = a elif len(b) == 2 and "joker" in b: out = b elif len(a) == 4: out = a elif len(b) == 4: out = b else: print("ERROR") continue else: if L.find(sorted(a)[0]) > L.find(sorted(b)[0]): out = a else: out = b print(" ".join(out))