結果

問題 No.1083 余りの余り
ユーザー pluto77pluto77
提出日時 2020-06-20 16:47:49
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 256 ms / 3,000 ms
コード長 211 bytes
コンパイル時間 1,492 ms
コンパイル使用メモリ 86,548 KB
実行使用メモリ 77,060 KB
最終ジャッジ日時 2023-09-16 17:36:42
合計ジャッジ時間 6,508 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,404 KB
testcase_01 AC 68 ms
71,356 KB
testcase_02 AC 69 ms
71,356 KB
testcase_03 AC 69 ms
71,176 KB
testcase_04 AC 91 ms
76,372 KB
testcase_05 AC 119 ms
76,516 KB
testcase_06 AC 69 ms
71,104 KB
testcase_07 AC 75 ms
76,424 KB
testcase_08 AC 67 ms
71,428 KB
testcase_09 AC 67 ms
71,192 KB
testcase_10 AC 68 ms
71,096 KB
testcase_11 AC 73 ms
76,592 KB
testcase_12 AC 68 ms
71,232 KB
testcase_13 AC 68 ms
71,092 KB
testcase_14 AC 68 ms
71,424 KB
testcase_15 AC 68 ms
71,268 KB
testcase_16 AC 68 ms
71,372 KB
testcase_17 AC 68 ms
70,984 KB
testcase_18 AC 162 ms
76,884 KB
testcase_19 AC 116 ms
76,252 KB
testcase_20 AC 75 ms
76,520 KB
testcase_21 AC 77 ms
76,528 KB
testcase_22 AC 68 ms
71,100 KB
testcase_23 AC 256 ms
76,944 KB
testcase_24 AC 238 ms
76,836 KB
testcase_25 AC 254 ms
76,780 KB
testcase_26 AC 238 ms
77,060 KB
testcase_27 AC 66 ms
71,108 KB
testcase_28 AC 241 ms
76,856 KB
testcase_29 AC 68 ms
71,268 KB
testcase_30 AC 68 ms
71,088 KB
testcase_31 AC 67 ms
71,180 KB
testcase_32 AC 69 ms
71,332 KB
testcase_33 AC 240 ms
76,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1083
n,k=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
res=0
for i in range(2**(n-1)):
 t=k
 for j in range(n-1):
  if i&(1<<j):
   t%=a[j]
 res=max(res,t%a[-1])
print(res)
0