You are viewing a single comment's thread. Return to all comments →
Python 3
from fractions import Fraction def jumpingOnClouds(c, k): n = len(c) jumps_needed = Fraction(n, k).numerator thunders = sum(map(lambda x: c[x%n], range(0,k*jumps_needed,k))) return 100 - jumps_needed - 2*thunders
Seems like cookies are disabled on this browser, please enable them to open this website
Jumping on the Clouds: Revisited
You are viewing a single comment's thread. Return to all comments →
Python 3