프로그래머스 120843 공 던지기

Jmnote (토론 | 기여)님의 2023년 11월 29일 (수) 21:38 판
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요[ | ]

프로그래머스 120843 공 던지기

2 C++[ | ]

#include <string>
#include <vector>

using namespace std;

int solution(vector<int> numbers, int k) {
    return ((k-1)*2)%numbers.size() + 1;
}