結果

問題 No.1628 Sorting Integers (MAX of M)
ユーザー かいかいかいかい
提出日時 2021-08-09 16:52:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 256 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 11,948 KB
実行使用メモリ 9,992 KB
最終ジャッジ日時 2023-10-21 14:38:27
合計ジャッジ時間 1,153 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
9,992 KB
testcase_01 AC 29 ms
9,992 KB
testcase_02 AC 29 ms
9,992 KB
testcase_03 AC 29 ms
9,992 KB
testcase_04 AC 30 ms
9,992 KB
testcase_05 AC 29 ms
9,992 KB
testcase_06 AC 30 ms
9,992 KB
testcase_07 AC 29 ms
9,992 KB
testcase_08 AC 33 ms
9,992 KB
testcase_09 AC 33 ms
9,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
c1, c2, c3, c4, c5, c6, c7, c8, c9 = map(int, input().split(' '))

a = []
c = [c1, c2, c3, c4, c5, c6, c7, c8, c9]


for i in range(9):
    for k in range(c[i]):
        a.append(str(i + 1))

a.sort(reverse=True)

I = ''.join(a)

print(I)
0