結果

問題 No.256 桁の数字を入れ替え (2)
ユーザー akanayaakanaya
提出日時 2020-03-26 16:41:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 169 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,628 KB
実行使用メモリ 9,344 KB
最終ジャッジ日時 2023-08-30 13:11:40
合計ジャッジ時間 890 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,428 KB
testcase_01 AC 18 ms
8,488 KB
testcase_02 AC 30 ms
9,344 KB
testcase_03 AC 28 ms
9,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

c = Counter(list(input().strip()))

for i in range(9, -1, -1):
    v = str(i)
    if c[v] != 0:
        print(v * c[v], end='')

print()
0