結果
問題 |
No.256 桁の数字を入れ替え (2)
|
ユーザー |
|
提出日時 | 2021-12-04 20:27:21 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 381 bytes |
コンパイル時間 | 665 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-07-07 03:15:39 |
合計ジャッジ時間 | 656 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 RE * 2 |
ソースコード
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))