結果

問題 No.1083 余りの余り
ユーザー komkompikomkompi
提出日時 2023-11-04 14:05:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 391 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 81,900 KB
実行使用メモリ 306,536 KB
最終ジャッジ日時 2023-11-04 14:06:05
合計ジャッジ時間 12,918 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,660 KB
testcase_01 AC 37 ms
53,660 KB
testcase_02 AC 42 ms
59,884 KB
testcase_03 AC 37 ms
53,660 KB
testcase_04 AC 48 ms
62,420 KB
testcase_05 WA -
testcase_06 AC 37 ms
53,660 KB
testcase_07 WA -
testcase_08 AC 42 ms
59,884 KB
testcase_09 AC 37 ms
53,660 KB
testcase_10 AC 42 ms
59,884 KB
testcase_11 AC 46 ms
62,420 KB
testcase_12 AC 38 ms
53,660 KB
testcase_13 AC 38 ms
53,660 KB
testcase_14 AC 37 ms
53,660 KB
testcase_15 AC 37 ms
53,660 KB
testcase_16 AC 37 ms
53,660 KB
testcase_17 AC 37 ms
53,660 KB
testcase_18 AC 631 ms
186,464 KB
testcase_19 AC 332 ms
126,964 KB
testcase_20 AC 49 ms
62,488 KB
testcase_21 AC 68 ms
74,132 KB
testcase_22 AC 37 ms
53,660 KB
testcase_23 AC 1,427 ms
306,480 KB
testcase_24 WA -
testcase_25 AC 1,429 ms
306,488 KB
testcase_26 WA -
testcase_27 AC 43 ms
59,884 KB
testcase_28 WA -
testcase_29 AC 37 ms
53,660 KB
testcase_30 AC 37 ms
53,660 KB
testcase_31 AC 37 ms
53,660 KB
testcase_32 AC 37 ms
53,660 KB
testcase_33 AC 1,420 ms
306,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!
import itertools

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

patterns = list(itertools.product([0, 1], repeat=N))

ans=0
for pattern in patterns:
    """
    1のやつは先に
    """
    x=K
    for a,bit in zip(A,pattern):
        if bit:
            x%=a
        
    for a in A:
        x%=a
        
    ans=max(ans,x)

print(ans)
0