You are viewing a single comment's thread. Return to all comments →
static int jumpingOnClouds(int[] c, int k) { int e = 100; int i = 0; do { if (c[i] == 0) { e -= 1; } else if (c[i] == 1) { e -= 3; } i = (i+k) % c.length; } while (i != 0); 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 →