[20260104] BOJ / G4 / 영재의 산책 / 한종욱 #1769
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧷 문제 링크
https://www.acmicpc.net/problem/19953
🧭 풀이 시간
30분
👀 체감 난이도
✏️ 문제 설명
만약 t초에 v의 속력으로 걷는다면 1초 동안 v의 속력으로 걷는다. 그리고 t+1초가 된 순간 오른쪽으로 90도 회전한 후 (v×m)%10의 속력으로 걷는다. 초기 속력 v0, m, 총 산책 시간 t가 주어졌을 때, 영재의 최종 위치를 출력하여라.
🔍 풀이 방법
비둘기집 원리를 사용한다.

여러 수를 대입해보면, 1번째 회전했을 때와, 5번째 회전했을 때의 속력이 같은 것을 확인할 수 있다.
처음 1초는 북쪽으로 보내고, t-1을 4로 나눠 몫만큼 반복하는 규칙대로 곱한 다음, t-1을 4로 나눈 나머지 만큼 규칙대로 더해주면 된다.
⏳ 회고
이 문제는 해석하는 게 제일 어려웠다.