結果

問題 No.1808 Fullgold Alchemist
ユーザー H3PO4H3PO4
提出日時 2022-01-14 21:30:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 320 bytes
コンパイル時間 338 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 32,724 KB
最終ジャッジ日時 2024-04-30 12:51:45
合計ジャッジ時間 6,864 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,752 KB
testcase_01 AC 31 ms
10,752 KB
testcase_02 AC 32 ms
10,880 KB
testcase_03 AC 31 ms
10,624 KB
testcase_04 AC 30 ms
10,624 KB
testcase_05 AC 71 ms
14,864 KB
testcase_06 AC 177 ms
24,488 KB
testcase_07 AC 89 ms
24,484 KB
testcase_08 WA -
testcase_09 AC 215 ms
32,724 KB
testcase_10 AC 114 ms
32,680 KB
testcase_11 AC 207 ms
32,680 KB
testcase_12 AC 102 ms
28,684 KB
testcase_13 AC 273 ms
28,680 KB
testcase_14 AC 327 ms
28,688 KB
testcase_15 AC 225 ms
28,684 KB
testcase_16 AC 35 ms
11,008 KB
testcase_17 AC 30 ms
10,624 KB
testcase_18 AC 61 ms
13,348 KB
testcase_19 AC 33 ms
11,008 KB
testcase_20 AC 92 ms
14,732 KB
testcase_21 AC 47 ms
12,256 KB
testcase_22 AC 30 ms
10,752 KB
testcase_23 AC 40 ms
11,776 KB
testcase_24 AC 36 ms
11,136 KB
testcase_25 AC 35 ms
11,264 KB
testcase_26 AC 86 ms
13,616 KB
testcase_27 AC 102 ms
14,736 KB
testcase_28 AC 292 ms
31,104 KB
testcase_29 AC 123 ms
17,316 KB
testcase_30 AC 104 ms
16,460 KB
testcase_31 AC 359 ms
29,416 KB
testcase_32 AC 174 ms
21,784 KB
testcase_33 AC 348 ms
26,308 KB
testcase_34 AC 283 ms
31,136 KB
testcase_35 AC 278 ms
24,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
A = tuple(map(int, input().split()))


def isOK(x):
    cur = 0
    for a in A:
        cur += a - x
        if cur < 0:
            return False
    return True


l, r = 0, 10 ** 9
while r - l > 1:
    m = (r + l) // 2
    if isOK(m * M):
        l = m
    else:
        r = m
print(l)
0