class Solution {public int chalkReplacer(int[] chalk, int k) {int i = 0;while(true){k -= chalk[i];if(k < 0){return i;}if(i == chalk.length - 1){i = 0;}else{i++;}}}
}
class Solution {public int chalkReplacer(int[] chalk, int k) {int i = 0;while(true){k -= chalk[i];if(k < 0){return i;}if(i == chalk.length - 1){i = 0;}else{i++;}}}
}