[Programmers] 푸드 파이트 대회
Python
def solution(food):
answer = ''
for i in range(1, len(food)):
food_count = food[i] // 2
if food_count != 0:
for j in range(food_count):
answer += str(i)
answer += "0" + answer[::-1]
return answer
댓글남기기