結果

問題 No.1083 余りの余り
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-03-10 23:33:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 568 ms / 3,000 ms
コード長 240 bytes
コンパイル時間 980 ms
コンパイル使用メモリ 86,832 KB
実行使用メモリ 77,064 KB
最終ジャッジ日時 2023-10-13 01:53:10
合計ジャッジ時間 8,705 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,256 KB
testcase_01 AC 71 ms
71,160 KB
testcase_02 AC 79 ms
76,072 KB
testcase_03 AC 74 ms
71,304 KB
testcase_04 AC 79 ms
76,332 KB
testcase_05 AC 163 ms
77,016 KB
testcase_06 AC 73 ms
71,208 KB
testcase_07 AC 79 ms
76,584 KB
testcase_08 AC 80 ms
76,256 KB
testcase_09 AC 72 ms
71,124 KB
testcase_10 AC 75 ms
76,328 KB
testcase_11 AC 78 ms
76,444 KB
testcase_12 AC 73 ms
71,472 KB
testcase_13 AC 72 ms
71,292 KB
testcase_14 AC 70 ms
71,348 KB
testcase_15 AC 72 ms
71,292 KB
testcase_16 AC 69 ms
71,156 KB
testcase_17 AC 71 ms
71,348 KB
testcase_18 AC 248 ms
76,848 KB
testcase_19 AC 161 ms
77,000 KB
testcase_20 AC 78 ms
76,328 KB
testcase_21 AC 86 ms
76,260 KB
testcase_22 AC 71 ms
71,316 KB
testcase_23 AC 417 ms
77,064 KB
testcase_24 AC 567 ms
76,600 KB
testcase_25 AC 434 ms
76,944 KB
testcase_26 AC 561 ms
76,852 KB
testcase_27 AC 77 ms
76,380 KB
testcase_28 AC 568 ms
76,988 KB
testcase_29 AC 74 ms
71,012 KB
testcase_30 AC 73 ms
71,196 KB
testcase_31 AC 73 ms
71,392 KB
testcase_32 AC 72 ms
71,124 KB
testcase_33 AC 566 ms
76,720 KB
権限があれば一括ダウンロードができます

ソースコード

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