結果

問題 No.205 マージして辞書順最小
ユーザー roiti46roiti46
提出日時 2015-05-08 22:56:31
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 219 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 6,528 KB
実行使用メモリ 6,084 KB
最終ジャッジ日時 2023-09-19 07:08:31
合計ジャッジ時間 1,653 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
5,784 KB
testcase_01 AC 11 ms
5,912 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 12 ms
5,868 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 15 ms
5,920 KB
testcase_11 AC 18 ms
5,984 KB
testcase_12 WA -
testcase_13 AC 14 ms
5,920 KB
testcase_14 AC 11 ms
5,856 KB
testcase_15 AC 11 ms
5,848 KB
testcase_16 AC 11 ms
5,844 KB
testcase_17 AC 11 ms
5,944 KB
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(raw_input())
S = sorted([raw_input() for i in xrange(N)])
M = sum(len(s) for s in S)
T = ""

for loop in xrange(M):
    T += S[0][0]
    S[0] = S[0][1:]
    if len(S[0]) == 0: S.pop(0)
    S = sorted(S)
print T
0