結果

問題 No.256 桁の数字を入れ替え (2)
ユーザー ThetaTheta
提出日時 2022-11-02 16:32:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 21 ms / 2,000 ms
コード長 237 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 8,644 KB
最終ジャッジ日時 2023-09-24 05:30:47
合計ジャッジ時間 827 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,320 KB
testcase_01 AC 15 ms
8,300 KB
testcase_02 AC 21 ms
8,640 KB
testcase_03 AC 21 ms
8,644 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter


def main():
    N = input()
    N_counter = Counter(N)
    ans = ""
    for num in map(str, reversed(range(10))):
        ans += num*N_counter[num]
    print(ans)


if __name__ == "__main__":
    main()
0