Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First for The Fastest House solution in Clear category for The Fastest Horse by koyana222
def fastest_horse(horses: list) -> int:
import statistics
count = []
rank = []
for i in horses:
for j in range(0,len(i)):
count.append(int(i[j][0])*60 + int(i[j][2:4]))
rank.append(count.index(min(count))+1)
count = []
return statistics.mode(rank)
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!")
July 27, 2019