結果

問題 No.1083 余りの余り
ユーザー U S
提出日時 2020-06-19 22:17:55
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 405 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 82,420 KB
実行使用メモリ 55,584 KB
最終ジャッジ日時 2024-07-03 14:55:55
合計ジャッジ時間 2,663 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
nax = 0
# for i in range(n):
#     u = a[:i]
#     crt = k % a[i]
#     for j in range(len(u)):
#         v = a[:j]
#         while v:
#             crt %= st
#
#
#
#     nax = max(nax,crt)
import copy
for i in range(n):
    u = copy.deepcopy(k)
    for j in range(i, -1, -1):
        u %= a[j]
    nax = max(nax, u)

print(nax)

0