結果

問題 No.1083 余りの余り
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-03-10 23:29:28
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 239 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 86,948 KB
実行使用メモリ 77,244 KB
最終ジャッジ日時 2023-10-13 01:49:45
合計ジャッジ時間 6,260 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 67 ms
71,628 KB
testcase_02 WA -
testcase_03 AC 70 ms
71,228 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 71 ms
71,304 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 69 ms
71,360 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 69 ms
71,556 KB
testcase_13 WA -
testcase_14 AC 70 ms
71,536 KB
testcase_15 AC 71 ms
71,552 KB
testcase_16 AC 69 ms
71,100 KB
testcase_17 AC 69 ms
71,476 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 79 ms
76,548 KB
testcase_22 AC 70 ms
71,252 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 321 ms
77,116 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 71 ms
71,240 KB
testcase_30 AC 71 ms
71,436 KB
testcase_31 AC 71 ms
71,364 KB
testcase_32 AC 71 ms
71,360 KB
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int,input().split())
A = sorted(list(map(int,input().split())),reverse=True)

ans = 0
for i in range(1<<n):
    num = k
    for j in range(n):
        if i << j & 1:
            num %= A[j]
    ans = max(ans,num%A[-1])
print(ans)
0