Of course, this has to be formalized. To do this, we assign a badness to each gap between words. The badness assigned to a gap of n spaces is (n-1)2. The goal of the program is to minimize the sum of all badnesses. For example, the badness of the first example is 1 + 72 = 50, whereas the badness of the second one is only 1 + 1 + 1 + 4 + 1 + 4 = 12.
sendol 2년 전
'문제'의 뒤에서 2번째 문단의 제곱에 위첨자가 적용되지 않아 지문 이해가 어렵습니다.
Of course, this has to be formalized. To do this, we assign a badness to each gap between words. The badness assigned to a gap of n spaces is (n-1)2. The goal of the program is to minimize the sum of all badnesses. For example, the badness of the first example is 1 + 72 = 50, whereas the badness of the second one is only 1 + 1 + 1 + 4 + 1 + 4 = 12.
에서
(n-1)2 -> (n-1)2
1 + 72 = 50 -> 1 + 72 = 50
으로 바꿔주세요.