結果
| 問題 |
No.437 cwwゲーム
|
| ユーザー |
htkb
|
| 提出日時 | 2018-05-25 22:22:14 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 480 bytes |
| コンパイル時間 | 72 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-06-28 18:06:15 |
| 合計ジャッジ時間 | 2,672 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 40 WA * 1 |
ソースコード
N = str(int(input()))[::-1]
high_score = [0]
def hoge(s, score):
for i, c1 in enumerate(s):
for j, c2 in enumerate(s[i+1:], start=i+1):
if c1 != c2:
continue
for k, c3 in enumerate(s[j+1:], start=j+1):
if c1 == c3:
continue
hoge(s[:i]+s[i+1:j]+s[j+1:k]+s[k+1:], score+int(c3+c2+c1))
if score > high_score[0]:
high_score[0] = score
hoge(N, 0)
print(high_score[0])
htkb