提出 #72423906
ソースコード 拡げる
""" <方針> - 到着時間と共に番号をリスト `horses` に保存する. - 到着時間でソートして,トップ3の番号を出力すれば良い. """ # 入力 N = int(input()) T = list(map(int, input().split())) # 順位を求める horses = [(i+1, t) for (i, t) in enumerate(T)] horses.sort(key=lambda x: x[1]) # 到着時間でソートする # トップ3の番号を取り出す top3 = list(map(lambda x: x[0], horses[:3])) # 出力 print(*top3)
提出情報
| 提出日時 | |
|---|---|
| 問題 | B - Trifecta |
| ユーザ | mattsunkun |
| 言語 | Python (PyPy 3.11-v7.3.20) |
| 得点 | 200 |
| コード長 | 489 Byte |
| 結果 | AC |
| 実行時間 | 55 ms |
| メモリ | 80048 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 200 / 200 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample_01.txt, sample_02.txt |
| All | random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, sample_01.txt, sample_02.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| random_01.txt | AC | 55 ms | 79904 KiB |
| random_02.txt | AC | 53 ms | 79916 KiB |
| random_03.txt | AC | 54 ms | 79920 KiB |
| random_04.txt | AC | 55 ms | 79616 KiB |
| random_05.txt | AC | 55 ms | 79920 KiB |
| random_06.txt | AC | 55 ms | 80048 KiB |
| random_07.txt | AC | 54 ms | 79968 KiB |
| random_08.txt | AC | 55 ms | 79744 KiB |
| sample_01.txt | AC | 53 ms | 79832 KiB |
| sample_02.txt | AC | 53 ms | 79920 KiB |