結果
| 問題 |
No.205 マージして辞書順最小
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-05-08 22:56:31 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 219 bytes |
| コンパイル時間 | 62 ms |
| コンパイル使用メモリ | 6,912 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2024-07-05 19:12:08 |
| 合計ジャッジ時間 | 864 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 7 WA * 8 |
ソースコード
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