結果

問題 No.1083 余りの余り
ユーザー anagohirameanagohirame
提出日時 2020-06-20 15:45:31
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 239 bytes
コンパイル時間 523 ms
コンパイル使用メモリ 86,904 KB
実行使用メモリ 77,320 KB
最終ジャッジ日時 2023-09-16 17:31:38
合計ジャッジ時間 7,204 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 73 ms
71,312 KB
testcase_02 WA -
testcase_03 AC 72 ms
71,288 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 72 ms
71,116 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 69 ms
71,180 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 71 ms
71,176 KB
testcase_15 AC 69 ms
71,088 KB
testcase_16 AC 71 ms
71,088 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 83 ms
76,332 KB
testcase_22 AC 70 ms
71,372 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 71 ms
71,360 KB
testcase_30 AC 71 ms
71,284 KB
testcase_31 WA -
testcase_32 AC 72 ms
71,100 KB
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
ans = 0
for b in range(1, 1<<n):
    res = k
    for i in range(n):
        if (b>>i) & 1:
            res %= a[i]
    ans = max(ans, res)
print(ans)
0