結果

問題 No.1083 余りの余り
ユーザー U SU S
提出日時 2020-06-19 22:17:55
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 405 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 87,088 KB
実行使用メモリ 71,928 KB
最終ジャッジ日時 2023-09-16 14:36:24
合計ジャッジ時間 4,524 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
71,568 KB
testcase_01 AC 82 ms
71,832 KB
testcase_02 AC 83 ms
71,800 KB
testcase_03 AC 84 ms
71,600 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 80 ms
71,496 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 82 ms
71,504 KB
testcase_10 AC 83 ms
71,496 KB
testcase_11 AC 82 ms
71,572 KB
testcase_12 AC 83 ms
71,624 KB
testcase_13 AC 84 ms
71,760 KB
testcase_14 AC 82 ms
71,788 KB
testcase_15 AC 82 ms
71,564 KB
testcase_16 AC 82 ms
71,604 KB
testcase_17 AC 84 ms
71,492 KB
testcase_18 WA -
testcase_19 AC 81 ms
71,876 KB
testcase_20 AC 84 ms
71,464 KB
testcase_21 AC 83 ms
71,372 KB
testcase_22 AC 82 ms
71,624 KB
testcase_23 AC 83 ms
71,692 KB
testcase_24 WA -
testcase_25 AC 83 ms
71,584 KB
testcase_26 WA -
testcase_27 AC 83 ms
71,616 KB
testcase_28 WA -
testcase_29 AC 83 ms
71,592 KB
testcase_30 AC 83 ms
71,604 KB
testcase_31 AC 83 ms
71,552 KB
testcase_32 AC 85 ms
71,588 KB
testcase_33 AC 82 ms
71,576 KB
権限があれば一括ダウンロードができます

ソースコード

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