結果
問題 |
No.39 桁の数字を入れ替え
|
ユーザー |
![]() |
提出日時 | 2022-05-15 11:08:21 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 206 bytes |
コンパイル時間 | 314 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 52,352 KB |
最終ジャッジ日時 | 2024-07-26 12:56:45 |
合計ジャッジ時間 | 2,147 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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)