-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathNauuo_and_Votes_CF.py
48 lines (39 loc) · 962 Bytes
/
Nauuo_and_Votes_CF.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#Nauuo and Votes - Codeforces
xyz = list(map(int, input().rstrip().split()))
up = xyz[0]
down = xyz[1]
tie = xyz[2]
if tie == 0:
if up > down:
print('+')
elif down > up:
print('-')
else:
print('0')
else:
if up == down and down == tie:
print('?')
elif up == down and tie > up:
print('?')
elif up > (down + tie):
print('+')
elif up == (down + tie):
print('?')
elif down > (up + tie):
print('-')
elif down == (up + tie):
print('?')
elif max(up,down) == up:
if down + tie < up:
print('+')
elif down + tie == up:
print('?')
else:
print('?')
elif max(up,down) == down:
if up + tie < down:
print('-')
elif up + tie == down:
print('?')
else:
print('?')