結果
問題 | No.256 桁の数字を入れ替え (2) |
ユーザー | ああいい |
提出日時 | 2021-12-04 20:27:21 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 381 bytes |
コンパイル時間 | 454 ms |
コンパイル使用メモリ | 10,704 KB |
実行使用メモリ | 8,368 KB |
最終ジャッジ日時 | 2023-09-21 08:59:03 |
合計ジャッジ時間 | 833 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
7,760 KB |
testcase_01 | AC | 15 ms
7,764 KB |
testcase_02 | RE | - |
testcase_03 | RE | - |
ソースコード
N = int(input()) a = [0] * 10 while N != 0: a[N % 10] += 1 N = N // 10 keta = sum(a) """ now = 0 t = 1 for i in range(keta): while True: if a[now] != 0: N += now * t t *= 10 a[now] -= 1 break else: now += 1 print(N) """ S = '' for i in reversed(range(10)): S += str(i) * a[i] print(int(S))