結果

問題 No.437 cwwゲーム
ユーザー NoaSaberNoaSaber
提出日時 2021-03-14 10:53:42
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 548 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 78,324 KB
最終ジャッジ日時 2024-04-23 19:18:48
合計ジャッジ時間 4,405 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,632 KB
testcase_01 AC 40 ms
53,504 KB
testcase_02 AC 86 ms
76,544 KB
testcase_03 AC 39 ms
53,504 KB
testcase_04 AC 40 ms
53,376 KB
testcase_05 AC 111 ms
77,460 KB
testcase_06 AC 162 ms
77,688 KB
testcase_07 AC 164 ms
77,560 KB
testcase_08 AC 145 ms
77,552 KB
testcase_09 AC 163 ms
78,324 KB
testcase_10 AC 140 ms
77,804 KB
testcase_11 AC 39 ms
53,504 KB
testcase_12 AC 52 ms
61,824 KB
testcase_13 AC 91 ms
76,672 KB
testcase_14 AC 101 ms
77,004 KB
testcase_15 AC 193 ms
78,008 KB
testcase_16 AC 44 ms
54,144 KB
testcase_17 AC 58 ms
65,152 KB
testcase_18 AC 75 ms
72,832 KB
testcase_19 WA -
testcase_20 AC 40 ms
53,376 KB
testcase_21 AC 39 ms
53,504 KB
testcase_22 AC 38 ms
53,248 KB
testcase_23 AC 41 ms
53,760 KB
testcase_24 AC 38 ms
53,376 KB
testcase_25 AC 42 ms
54,784 KB
testcase_26 AC 49 ms
61,696 KB
testcase_27 AC 41 ms
53,120 KB
testcase_28 AC 40 ms
53,376 KB
testcase_29 AC 39 ms
53,248 KB
testcase_30 AC 39 ms
53,376 KB
testcase_31 AC 39 ms
53,248 KB
testcase_32 AC 38 ms
53,376 KB
testcase_33 AC 58 ms
65,408 KB
testcase_34 AC 41 ms
53,248 KB
testcase_35 AC 39 ms
53,760 KB
testcase_36 AC 39 ms
53,504 KB
testcase_37 AC 39 ms
53,376 KB
testcase_38 AC 40 ms
53,120 KB
testcase_39 AC 38 ms
53,120 KB
testcase_40 AC 38 ms
53,760 KB
testcase_41 AC 47 ms
61,056 KB
testcase_42 AC 48 ms
60,672 KB
testcase_43 AC 44 ms
59,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=input()
pt=[]
for i in range(len(N)):
    for j in range(i+1,len(N)):
        for k in range(j+1,len(N)):
            if N[i]!=N[j] and N[j]==N[k]:
                pt.append((i,j,k))
from copy import deepcopy
def ans(his,nu):
    if his.count(0)<3:
        return nu
    maximum=nu
    for i,j,k in pt:
        if all([his[i]==0,his[j]==0,his[k]==0]):
            his_c=deepcopy(his)
            his_c[i]=1;his_c[j]=1;his_c[k]=1
            maximum=max(maximum,ans(his_c,nu+int(N[i])*100+int(N[j])*11))
    return maximum
print(ans([0]*len(N),0))
0