Playground/자바문제집

[프로그래머스] 공 던지기

미숫가루설탕많이 2023. 2. 4. 21:35
class Solution {
    public int solution(int[] numbers, int k) {
        return numbers[(2 * (k - 1)) % numbers.length];
    }
}