Published:
Updated:

  • Reference
  • i가 15까지라는 걸 잘 캐치해야 함


Solution

import sys
from typing import List


def solution(words: List[str]):
    answer = ''

    for i in range(15):
        for j in range(len(words)):
            if len(words[j]) > i:
                answer += words[j][i]

    return answer


array = []
for _ in range(5):
    array.append(sys.stdin.readline().rstrip())

print(solution(array))

Leave a comment