結果

問題 No.205 マージして辞書順最小
ユーザー yuto_te
提出日時 2019-01-22 14:43:06
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 288 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-09-15 13:33:37
合計ジャッジ時間 1,515 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 RE * 3
other AC * 2 RE * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
length = 0
words = []
for _ in range(n):
    s = input()
    length += len(s)
    words.append(list(s))

t = ""
for _ in range(length):
    x = min(w[0] for w in words)
    for i,w in enumerate(words):
        if x == w[0]:
            words[i].pop(0)
    t += x
print(t)
0