結果
| 問題 | No.39 桁の数字を入れ替え |
| コンテスト | |
| ユーザー |
AEn
|
| 提出日時 | 2022-05-15 11:08:21 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 206 bytes |
| 記録 | |
| コンパイル時間 | 195 ms |
| コンパイル使用メモリ | 85,760 KB |
| 実行使用メモリ | 52,096 KB |
| 最終ジャッジ日時 | 2026-04-03 16:54:47 |
| 合計ジャッジ時間 | 1,694 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 WA * 1 |
ソースコード
from itertools import combinations
N = list(input())
res = 0
for v in combinations(range(len(N)), 2):
a = N.copy()
a[v[0]], a[v[1]] = a[v[1]], a[v[0]]
res = max(res, int(''.join(a)))
print(res)
AEn