問題
B – A±B Problem
回答
A, B, C = map(int, input().split()) sum_ab = A + B diff_ab = A - B if sum_ab == C and diff_ab == C: print('?') elif sum_ab == C: print('+') elif diff_ab == C: print('-') else: print('!')
Freedom is a responsible choice.
A, B, C = map(int, input().split()) sum_ab = A + B diff_ab = A - B if sum_ab == C and diff_ab == C: print('?') elif sum_ab == C: print('+') elif diff_ab == C: print('-') else: print('!')