class UserMainCode(object):
@classmethod
def electionResult(cls, input1, input2, input3):
t = {}
f = {}
for i in range(input1):
p = input2[i]
t[p] = t.get(p, 0) + input3[i]
if p not in f:
f[p] = i
w = None
m = -1
for p, v in t.items():
if v > m or (v == m and f[p] < f[w]):
m = v
w = p
return f"{w} {m}"
ACCENTURE - 6 PM
15 oct, 10:40

