結果
問題 |
No.205 マージして辞書順最小
|
ユーザー |
|
提出日時 | 2019-01-22 14:54:21 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 364 bytes |
コンパイル時間 | 111 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-09-15 13:33:45 |
合計ジャッジ時間 | 1,374 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 4 |
other | RE * 15 |
ソースコード
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 for w in words) for i,w in enumerate(words): if x == w: words[i].pop(0) if len(words[i]) == 0: del words[i] break t += x print(t)