XJTU_Python/test/2/2.py

23 lines
437 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

def js(a, b):
if (a == 1 and b == 2 or a == 2 and b == 3 or a == 3 and b == 1):
return 1
else:
return 0
a, b, c = map(int, input().split())
d, e, f = map(int, input().split())
a1 = 0
a2 = 0
a1 += js(a, d)+js(b, e)+js(c, f)
a2 += js(d, a)+js(e, b)+js(f, c)
if (a1 > a2):
print("A")
elif (a1 == a2):
print("C")
else:
print("B")
# 1表示石头2表示剪刀3表示布
# 暴力算法,等会改