1188번: 음식 평론가
Difficulty : Gold V
Problem Description
There is 'N' sausages and 'M' food critics.
The output is the smallest count to cut sausages to provide equally sized sausages among food critics.
Solution
Think of 'N' sausages as one sausages of length 'N'.
In this case, count is always M-1 because I don't have to cut for the last person.
And if sum of the length of all cut sausages is natural number, I don't have to cut because the sausage is already cut.
There is a picture to describe.
In this case, the default count is 5, but I don't have to count the second cut and the forth count.
So the answer is 5-2=3.
The default count is 'M'.
'N/M' is the piece of sausages for one critic, and i is the order of cutting.
Each sequence, if this value is natural number, decrease count.
Today's English
default : 기본값
critic : 평론가
think of A as B : A를 B로 간주하다
여담
이게 왜 골드?