結果

問題 No.1083 余りの余り
ユーザー AEnAEn
提出日時 2022-05-16 21:28:42
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 231 bytes
コンパイル時間 769 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 85,252 KB
最終ジャッジ日時 2023-10-12 15:52:54
合計ジャッジ時間 9,241 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
71,132 KB
testcase_01 AC 76 ms
71,256 KB
testcase_02 AC 86 ms
76,212 KB
testcase_03 AC 77 ms
71,360 KB
testcase_04 WA -
testcase_05 AC 175 ms
78,684 KB
testcase_06 AC 73 ms
70,908 KB
testcase_07 AC 83 ms
76,368 KB
testcase_08 AC 83 ms
76,472 KB
testcase_09 AC 77 ms
71,164 KB
testcase_10 AC 82 ms
76,220 KB
testcase_11 WA -
testcase_12 AC 78 ms
71,504 KB
testcase_13 AC 77 ms
71,356 KB
testcase_14 AC 76 ms
71,312 KB
testcase_15 AC 75 ms
71,176 KB
testcase_16 AC 77 ms
71,076 KB
testcase_17 AC 75 ms
71,196 KB
testcase_18 WA -
testcase_19 AC 174 ms
78,824 KB
testcase_20 AC 85 ms
76,356 KB
testcase_21 AC 92 ms
76,552 KB
testcase_22 AC 74 ms
71,084 KB
testcase_23 AC 608 ms
85,024 KB
testcase_24 AC 617 ms
84,948 KB
testcase_25 AC 612 ms
85,008 KB
testcase_26 AC 606 ms
85,224 KB
testcase_27 AC 80 ms
76,360 KB
testcase_28 WA -
testcase_29 AC 75 ms
71,352 KB
testcase_30 AC 74 ms
71,404 KB
testcase_31 AC 75 ms
71,200 KB
testcase_32 AC 74 ms
71,064 KB
testcase_33 AC 607 ms
84,988 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
A = list(map(int, input().split()))

dp = [-1]*(1<<N)
dp[0] = K

for i in range(1<<N):
    for j in range(N):
        if i & (1<<j):
            dp[i] = max(dp[i], dp[i - (1<<j)]%A[j])
print(dp[-1])
0