結果
| 問題 |
No.39 桁の数字を入れ替え
|
| コンテスト | |
| ユーザー |
togatoga
|
| 提出日時 | 2015-09-04 07:53:56 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 279 bytes |
| コンパイル時間 | 151 ms |
| コンパイル使用メモリ | 6,944 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-18 23:40:42 |
| 合計ジャッジ時間 | 863 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 WA * 1 |
ソースコード
S = raw_input()
res = 0
for i in range(len(S)):
for j in range(i + 1, len(S)):
if (i == 0):
res = max(res, int(S[j] + S[i + 1:j] + S[i] + S[j + 1:]))
else:
res = max(res, int(S[0:i] + S[j] + S[i + 1:j] + S[i] + S[j + 1:]))
print res
togatoga