結果

問題 No.1083 余りの余り
ユーザー tanon710tanon710
提出日時 2020-06-19 23:47:24
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 238 bytes
コンパイル時間 970 ms
コンパイル使用メモリ 87,208 KB
実行使用メモリ 85,184 KB
最終ジャッジ日時 2023-09-16 16:01:11
合計ジャッジ時間 8,582 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,276 KB
testcase_01 AC 70 ms
71,036 KB
testcase_02 AC 75 ms
76,124 KB
testcase_03 AC 71 ms
71,316 KB
testcase_04 WA -
testcase_05 AC 192 ms
78,816 KB
testcase_06 AC 70 ms
71,288 KB
testcase_07 AC 78 ms
76,268 KB
testcase_08 AC 77 ms
76,156 KB
testcase_09 AC 70 ms
71,196 KB
testcase_10 AC 76 ms
76,212 KB
testcase_11 WA -
testcase_12 AC 69 ms
71,188 KB
testcase_13 AC 70 ms
71,052 KB
testcase_14 AC 70 ms
71,204 KB
testcase_15 AC 70 ms
71,144 KB
testcase_16 AC 70 ms
71,036 KB
testcase_17 AC 68 ms
71,128 KB
testcase_18 WA -
testcase_19 AC 191 ms
78,736 KB
testcase_20 AC 79 ms
76,148 KB
testcase_21 AC 89 ms
76,896 KB
testcase_22 AC 70 ms
71,320 KB
testcase_23 AC 620 ms
85,184 KB
testcase_24 AC 621 ms
84,868 KB
testcase_25 AC 629 ms
84,824 KB
testcase_26 AC 622 ms
84,960 KB
testcase_27 AC 79 ms
76,192 KB
testcase_28 WA -
testcase_29 AC 67 ms
71,196 KB
testcase_30 AC 69 ms
71,032 KB
testcase_31 AC 69 ms
71,104 KB
testcase_32 AC 67 ms
71,128 KB
testcase_33 AC 605 ms
85,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k=map(int,input().split())
arr=list(map(int,input().split()))
dp=[0]*(2**n)
dp[0]=k
for i in range(2**n):
    for j in range(n):
        if i&(1<<j):
            continue
        dp[i+(1<<j)]=max(dp[i+(1<<j)],dp[i]%arr[j])
print(dp[-1])
0