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.
** 📘 풀이한 문제 **
BOJ 4796번 (https://www.acmicpc.net/problem/4796)
** ⭐ 문제에서 주로 사용한 알고리즘 **
구현
** 📜 대략적인 코드 설명 **
몫과 나머지를 활용하여 풀었습니다.
처음으로 몫을 구하는 과정에서 몇 번의 주기를 도는 지에 대하여 확인하였습니다. ans 변수에 V를 P로 나눈 뒤 L을 곱한 값을 더했습니다.
나머지의 경우, 한 주기에서 최대 L의 일수 만큼만 사용 가능하므로 L을 기준으로 L보다 나머지가 작은 경우 나머지를 더하고, 크거나 같은 경우 L을 더했습니다.
또한 f string을 활용하여 출력문을 작성하였습니다.