結果
| 問題 | No.39 桁の数字を入れ替え |
| コンテスト | |
| ユーザー |
yaoshimax
|
| 提出日時 | 2015-02-22 02:46:51 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 72 ms / 5,000 ms |
| コード長 | 168 bytes |
| 記録 | |
| コンパイル時間 | 129 ms |
| コンパイル使用メモリ | 77,720 KB |
| 最終ジャッジ日時 | 2025-12-03 14:06:48 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
N=raw_input()
ans = int(N)
for i in range(len(N)):
for j in range (i+1,len(N)):
n=N[:i]+N[j]+N[i+1:j]+N[i]+N[j+1:]
ans = max(int(n),ans)
print ans
yaoshimax