結果

問題 No.205 マージして辞書順最小
ユーザー pop
提出日時 2015-05-09 00:04:09
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 275 bytes
コンパイル時間 123 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-05 20:51:10
合計ジャッジ時間 1,206 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 2
other AC * 7 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

n = int(input())
l = sys.stdin.read().split()

T = ""
l = sorted(l, key=lambda x: x[0])
while len(l[0]) > 0:
    T += l[0][0]
    l[0] = l[0][1:]
    if "" in l:
        l.remove("")
    if len(l) == 0:
        break
    l = sorted(l, key=lambda x: x[0])
print(T)
0