結果
| 問題 |
No.39 桁の数字を入れ替え
|
| コンテスト | |
| ユーザー |
ゆるく
|
| 提出日時 | 2014-10-16 00:41:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 225 bytes |
| コンパイル時間 | 204 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-12-30 09:19:11 |
| 合計ジャッジ時間 | 1,788 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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 int(l[mx]) > int(l[i]):
l[mx], l[i] = l[i], l[mx]
break
print(''.join(l))
ゆるく