Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The Fastest Horse by radek120299
def fastest_horse(horses):
a=0
for i in range(len(horses[0])):
count = 0
for j in range(len(horses)):
if horses[j][i] == min(horses[j]):
count += 1
if count > a:
a, zwyciezca = count, i
return zwyciezca + 1
if __name__ == '__main__':
print("Example:")
print(fastest_horse([['1:13', '1:26', '1:11']]))
#These "asserts" using only for self-checking and not necessary for auto-testing
assert fastest_horse([['1:13', '1:26', '1:11'], ['1:10', '1:18', '1:14'], ['1:20', '1:23', '1:15']]) == 3
print("Coding complete? Click 'Check' to earn cool rewards!")
Nov. 2, 2018
Comments: