12100
편집 시간: 2022년 3월 2일 오후 10:30 코드 Algorithm/12100.py at main · Junroot/Algorithm 풀이 bfs를 이용해서 모든 경우를 탐색하여 최대값을 구했다. 특정 방향으로 숫자를 합칠 때, 이미 한 번 합쳐진 숫자는 합쳐지지 못하는 점을 주의해야된다. 이를 해결하기위해, 루프를 돌면서 자신과 그 뒤에 있는 숫자가 같은 경우는 두 수를 합치고 index를 2만큼 늘리도록 구현을 했다. index_of_numbers = 0 while index_of_numbers < len(numbers) - 1: if numbers[index_of_numbers] == numbers[index_of_numbers + 1]: new_column.append(numbers[index_of_numbers] * 2) index_of_numbers += 1 else: new_column....