結果
| 問題 | 
                            No.256 桁の数字を入れ替え (2)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-12-04 20:21:49 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 280 bytes | 
| コンパイル時間 | 89 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-07-07 03:09:11 | 
| 合計ジャッジ時間 | 685 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / 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
for i in range(keta):
    while True:
        if a[now] != 0:
            N += now * 10 ** i
            a[now] -= 1
            break
        else:
            now += 1
print(N)