結果

問題 No.1083 余りの余り
ユーザー tanon710tanon710
提出日時 2020-06-19 23:51:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 238 bytes
コンパイル時間 461 ms
コンパイル使用メモリ 87,052 KB
実行使用メモリ 84,920 KB
最終ジャッジ日時 2023-09-16 16:08:14
合計ジャッジ時間 6,497 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 69 ms
71,524 KB
testcase_02 WA -
testcase_03 AC 68 ms
71,452 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 69 ms
71,380 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 70 ms
71,596 KB
testcase_10 AC 74 ms
76,184 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 70 ms
71,540 KB
testcase_15 AC 71 ms
71,304 KB
testcase_16 AC 71 ms
71,456 KB
testcase_17 AC 71 ms
71,400 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 88 ms
76,624 KB
testcase_22 AC 72 ms
71,584 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 69 ms
71,348 KB
testcase_30 AC 69 ms
71,132 KB
testcase_31 AC 68 ms
71,388 KB
testcase_32 AC 67 ms
71,452 KB
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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