题解 | #扑克牌大小#
扑克牌大小
http://www.nowcoder.com/practice/d290db02bacc4c40965ac31d16b1c3eb
a = input().split("-")
if len(a[0]) == len(a[1]):
if a[0][0] == "J":
print(a[0])
elif a[0][0] == "j" and a[1][0] != "J":
print(a[0])
elif a[0][0] == "A" and a[1][0] != "J" and a[1][0] != "j":
print(a[0])
elif a[1][0] == "J":
print(a[1])
elif a[1][0] == "j":
print(a[1])
elif a[1][0] == "A":
print(a[1])
elif int(a[0][0]) > int(a[1][0]):
print(a[0])
elif int(a[0][0]) < int(a[1][0]):
print(a[1])
else:
if a[0][0] == "J":
print(a[0])
elif a[0][0] == "j" and a[1][0] != "J":
print(a[0])
elif a[0][0] == "A" and a[1][0] != "J" and a[1][0] != "j":
print(a[0])
elif a[1][0] == "J":
print(a[1])
elif a[1][0] == "j":
print(a[1])
elif a[1][0] == "A":
print(a[1])
elif len(a[0]) == 11:
print(a[0])
elif len(a[0]) == 7 and len(a[1]) != 11:
print(a[0])
elif len(a[1]) == 11:
print(a[1])
elif len(a[1]) == 7:
print(a[1])
elif a[0][-1] == "A":
print(a[0])
elif a[1][-1] == "A":
print(a[1])
else:
print("ERROR")