結果

問題 No.437 cwwゲーム
ユーザー NoaSaberNoaSaber
提出日時 2021-03-14 11:01:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 208 ms / 2,000 ms
コード長 561 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 78,632 KB
最終ジャッジ日時 2024-04-23 19:20:14
合計ジャッジ時間 4,247 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
53,376 KB
testcase_01 AC 43 ms
53,248 KB
testcase_02 AC 88 ms
76,584 KB
testcase_03 AC 44 ms
53,248 KB
testcase_04 AC 43 ms
53,784 KB
testcase_05 AC 52 ms
60,800 KB
testcase_06 AC 101 ms
76,800 KB
testcase_07 AC 168 ms
77,844 KB
testcase_08 AC 124 ms
77,576 KB
testcase_09 AC 167 ms
77,872 KB
testcase_10 AC 151 ms
77,476 KB
testcase_11 AC 44 ms
53,632 KB
testcase_12 AC 53 ms
62,080 KB
testcase_13 AC 94 ms
76,680 KB
testcase_14 AC 95 ms
76,776 KB
testcase_15 AC 208 ms
78,632 KB
testcase_16 AC 43 ms
53,888 KB
testcase_17 AC 61 ms
66,048 KB
testcase_18 AC 70 ms
70,272 KB
testcase_19 AC 44 ms
53,248 KB
testcase_20 AC 43 ms
53,760 KB
testcase_21 AC 44 ms
53,376 KB
testcase_22 AC 43 ms
53,632 KB
testcase_23 AC 44 ms
53,632 KB
testcase_24 AC 43 ms
53,888 KB
testcase_25 AC 46 ms
55,168 KB
testcase_26 AC 51 ms
61,952 KB
testcase_27 AC 43 ms
53,248 KB
testcase_28 AC 43 ms
53,888 KB
testcase_29 AC 43 ms
53,376 KB
testcase_30 AC 44 ms
53,504 KB
testcase_31 AC 44 ms
53,120 KB
testcase_32 AC 44 ms
53,248 KB
testcase_33 AC 58 ms
65,152 KB
testcase_34 AC 44 ms
53,632 KB
testcase_35 AC 43 ms
53,760 KB
testcase_36 AC 44 ms
53,248 KB
testcase_37 AC 43 ms
53,248 KB
testcase_38 AC 44 ms
53,504 KB
testcase_39 AC 44 ms
53,120 KB
testcase_40 AC 43 ms
53,248 KB
testcase_41 AC 51 ms
61,056 KB
testcase_42 AC 48 ms
55,040 KB
testcase_43 AC 50 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 all([N[i]!=N[j],N[j]==N[k],N[i]!="0"]):
                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