You are viewing a single comment's thread. Return to all comments →
function jumpingOnClouds(c, k) { let n = c.length, energy = 100; let index = 0; do { energy -= c[index] === 1 ? 3 : 1; index = (index + k ) % n; }while(index !== 0); return energy; }
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 →