結果

問題 No.1083 余りの余り
ユーザー uni_pythonuni_python
提出日時 2020-06-19 21:52:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 483 bytes
コンパイル時間 321 ms
コンパイル使用メモリ 86,580 KB
実行使用メモリ 84,936 KB
最終ジャッジ日時 2023-09-16 14:00:51
合計ジャッジ時間 8,149 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,068 KB
testcase_01 AC 70 ms
71,212 KB
testcase_02 AC 81 ms
75,948 KB
testcase_03 AC 73 ms
71,164 KB
testcase_04 WA -
testcase_05 AC 183 ms
78,608 KB
testcase_06 AC 67 ms
71,252 KB
testcase_07 AC 76 ms
76,168 KB
testcase_08 AC 78 ms
75,880 KB
testcase_09 AC 68 ms
71,124 KB
testcase_10 AC 75 ms
76,176 KB
testcase_11 WA -
testcase_12 AC 71 ms
71,028 KB
testcase_13 AC 70 ms
71,104 KB
testcase_14 AC 71 ms
71,148 KB
testcase_15 AC 69 ms
71,112 KB
testcase_16 AC 69 ms
71,104 KB
testcase_17 AC 68 ms
70,932 KB
testcase_18 WA -
testcase_19 AC 182 ms
78,936 KB
testcase_20 AC 76 ms
75,800 KB
testcase_21 AC 88 ms
76,144 KB
testcase_22 AC 68 ms
71,148 KB
testcase_23 AC 660 ms
84,608 KB
testcase_24 AC 669 ms
84,928 KB
testcase_25 AC 659 ms
84,488 KB
testcase_26 AC 674 ms
84,936 KB
testcase_27 AC 76 ms
76,368 KB
testcase_28 WA -
testcase_29 AC 71 ms
70,792 KB
testcase_30 AC 69 ms
71,148 KB
testcase_31 AC 70 ms
71,024 KB
testcase_32 AC 69 ms
71,036 KB
testcase_33 AC 679 ms
84,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
mod=10**9+7

def main():
    N,K=MI()
    A=LI()
    inf=10**9+1
    M=pow(2,N)
    dp=[0]*(M)
    dp[0]=K
    
    for i in range(1,M):
        for j in range(N):
            if i>>j&1:
                temp=(dp[i-pow(2,j)])%A[j]
                dp[i]=max(dp[i],temp)
                
    print(dp[-1])
    
    
    


main()
0