結果
| 問題 | No.39 桁の数字を入れ替え |
| コンテスト | |
| ユーザー |
akanaya
|
| 提出日時 | 2020-04-07 16:19:25 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 34 ms / 5,000 ms |
| コード長 | 295 bytes |
| 記録 | |
| コンパイル時間 | 117 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-07-07 15:03:44 |
| 合計ジャッジ時間 | 1,445 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
n = list(map(int, list(input())))
result = n
for i in range(len(n)):
for j in range(i, len(n)):
temp = n.copy()
if n[i] <= n[j]:
temp[i], temp[j] = temp[j], temp[i]
if temp > result:
result = temp
print(''.join(map(str, result)))
akanaya