You are viewing a single comment's thread. Return to all comments →
C# static int jumpingOnClouds(int[] c, int k) { var energy = 100; var currentCloud = 0;
do { currentCloud += k; currentCloud %= c.Length; energy -= 1; if (c[currentCloud] == 1) energy -= 2; } while (currentCloud != 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 →
C# static int jumpingOnClouds(int[] c, int k) { var energy = 100; var currentCloud = 0;
}