You are viewing a single comment's thread. Return to all comments →
python3 solution
def jumpingOnClouds(c: [int], k: int) -> int: e = 100 n = len(c) i = k % n while i != 0: e -= 1 + 2 * c[i] i = (i + k) % n e -= 1 + 2 * c[i] return e
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 →
python3 solution