結果

問題 No.1083 余りの余り
ユーザー convexineqconvexineq
提出日時 2020-06-19 21:51:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 104 ms / 3,000 ms
コード長 307 bytes
コンパイル時間 254 ms
コンパイル使用メモリ 86,872 KB
実行使用メモリ 88,152 KB
最終ジャッジ日時 2023-09-16 13:59:11
合計ジャッジ時間 4,219 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,152 KB
testcase_01 AC 71 ms
71,368 KB
testcase_02 AC 70 ms
71,416 KB
testcase_03 AC 71 ms
70,988 KB
testcase_04 AC 75 ms
71,184 KB
testcase_05 AC 84 ms
78,760 KB
testcase_06 AC 71 ms
71,192 KB
testcase_07 AC 72 ms
71,504 KB
testcase_08 AC 73 ms
71,152 KB
testcase_09 AC 72 ms
71,000 KB
testcase_10 AC 71 ms
71,200 KB
testcase_11 AC 71 ms
71,200 KB
testcase_12 AC 70 ms
71,280 KB
testcase_13 AC 72 ms
71,296 KB
testcase_14 AC 73 ms
71,248 KB
testcase_15 AC 72 ms
71,272 KB
testcase_16 AC 73 ms
71,168 KB
testcase_17 AC 72 ms
71,184 KB
testcase_18 AC 92 ms
81,720 KB
testcase_19 AC 82 ms
78,660 KB
testcase_20 AC 77 ms
76,032 KB
testcase_21 AC 78 ms
76,228 KB
testcase_22 AC 72 ms
71,284 KB
testcase_23 AC 103 ms
88,152 KB
testcase_24 AC 104 ms
87,772 KB
testcase_25 AC 102 ms
87,968 KB
testcase_26 AC 102 ms
88,024 KB
testcase_27 AC 71 ms
71,396 KB
testcase_28 AC 103 ms
87,976 KB
testcase_29 AC 71 ms
71,232 KB
testcase_30 AC 70 ms
71,156 KB
testcase_31 AC 73 ms
71,436 KB
testcase_32 AC 73 ms
71,228 KB
testcase_33 AC 103 ms
87,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!
import sys
read = sys.stdin.read
readline = sys.stdin.readline

n,k,*a = map(int,read().split())
a.sort(reverse=True)

N = 1<<n
ans = 0

res = [k]
for ai in a[:-1]:
    res += [r%ai for r in res]

#print(res)
#print([r%a[-1] for r in res])

print(max(r%a[-1] for r in res))
0