結果
問題 |
No.39 桁の数字を入れ替え
|
ユーザー |
![]() |
提出日時 | 2017-01-04 11:47:25 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 245 bytes |
コンパイル時間 | 114 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-12-16 11:06:34 |
合計ジャッジ時間 | 1,475 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 WA * 4 |
ソースコード
n = list(map(int, list(input()))) n_max = max(n) n_max_index = len(n) - n[::-1].index(n_max) - 1 for i in range(n_max_index): if n[i] == n_max: continue n[i], n[n_max_index] = n[n_max_index], n[i] break for i in n: print(i, end='') print()