結果
問題 |
No.39 桁の数字を入れ替え
|
ユーザー |
![]() |
提出日時 | 2014-10-16 00:51:39 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 291 bytes |
コンパイル時間 | 102 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-30 09:19:22 |
合計ジャッジ時間 | 1,484 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 WA * 4 |
ソースコード
l = list(input()) mx = len(l) - list(reversed(l)).index(max(l)) - 1 if mx != 0: for i in range(len(l)): if mx > i: if int(l[mx]) > int(l[i]): l[mx], l[i] = l[i], l[mx] break else: break print(''.join(l))