题解 | #扑克牌大小#
扑克牌大小
https://www.nowcoder.com/practice/d290db02bacc4c40965ac31d16b1c3eb
A,B = input().strip().split('-')
a = A.split(' ')
b = B.split(' ')
dic = dict()
arr = '3 4 5 6 7 8 9 10 J Q K A 2 joker JOKER'.split(' ')
for i in range(len(arr)):
dic[arr[i]] = i
if 'joker' in a and 'JOKER' in a:
print(' '.join(a))
elif 'joker' in b and 'JOKER' in b:
print(' '.join(b))
elif len(a) == 4 and len(b) == 4:
if dic.get(a[0]) > dic.get(b[0]):
print(' '.join(a))
else:
print(' '.join(b))
elif len(a) == 4 and len(b) != 4:
print(' '.join(a))
elif len(a) != 4 and len(b) == 4:
print(' '.join(b))
elif len(a) != len(b):
print('ERROR')
elif dic.get(a[0]) > dic.get(b[0]):
print(' '.join(a))
else:
print(' '.join(b))

