結果

問題 No.1083 余りの余り
ユーザー uni_pythonuni_python
提出日時 2020-06-19 22:16:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 543 ms / 3,000 ms
コード長 504 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 86,888 KB
実行使用メモリ 76,920 KB
最終ジャッジ日時 2023-09-16 14:35:50
合計ジャッジ時間 7,357 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,188 KB
testcase_01 AC 69 ms
70,888 KB
testcase_02 AC 77 ms
76,088 KB
testcase_03 AC 69 ms
71,204 KB
testcase_04 AC 76 ms
76,436 KB
testcase_05 AC 159 ms
76,788 KB
testcase_06 AC 71 ms
71,296 KB
testcase_07 AC 78 ms
76,224 KB
testcase_08 AC 75 ms
76,060 KB
testcase_09 AC 71 ms
71,320 KB
testcase_10 AC 76 ms
76,120 KB
testcase_11 AC 76 ms
76,308 KB
testcase_12 AC 70 ms
71,212 KB
testcase_13 AC 71 ms
71,176 KB
testcase_14 AC 71 ms
70,936 KB
testcase_15 AC 70 ms
71,260 KB
testcase_16 AC 70 ms
71,296 KB
testcase_17 AC 70 ms
71,252 KB
testcase_18 AC 248 ms
76,648 KB
testcase_19 AC 160 ms
76,848 KB
testcase_20 AC 76 ms
76,200 KB
testcase_21 AC 86 ms
76,312 KB
testcase_22 AC 71 ms
71,316 KB
testcase_23 AC 533 ms
76,660 KB
testcase_24 AC 538 ms
76,660 KB
testcase_25 AC 538 ms
76,920 KB
testcase_26 AC 538 ms
76,816 KB
testcase_27 AC 75 ms
76,236 KB
testcase_28 AC 538 ms
76,916 KB
testcase_29 AC 68 ms
71,376 KB
testcase_30 AC 70 ms
71,248 KB
testcase_31 AC 69 ms
71,280 KB
testcase_32 AC 71 ms
71,104 KB
testcase_33 AC 543 ms
76,752 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()
    A.sort(reverse=True)
    
    ans=0
    M=pow(2,N)
    
    for i in range(1,M):
        temp=K
        for j in range(N):
            if i>>j&1:
                temp=temp%A[j]
                
        ans=max(ans,temp%A[-1])
                
            
    print(ans)
    
    
    


main()
0