結果

問題 No.1808 Fullgold Alchemist
ユーザー playerplayer
提出日時 2024-01-15 01:39:17
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 441 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 119,908 KB
最終ジャッジ日時 2024-01-15 01:39:32
合計ジャッジ時間 4,450 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,460 KB
testcase_01 AC 35 ms
53,460 KB
testcase_02 AC 35 ms
53,460 KB
testcase_03 AC 35 ms
53,460 KB
testcase_04 AC 35 ms
53,460 KB
testcase_05 AC 79 ms
111,788 KB
testcase_06 AC 98 ms
119,908 KB
testcase_07 AC 86 ms
117,348 KB
testcase_08 WA -
testcase_09 AC 108 ms
112,328 KB
testcase_10 AC 106 ms
112,328 KB
testcase_11 AC 107 ms
112,308 KB
testcase_12 AC 91 ms
116,328 KB
testcase_13 AC 99 ms
117,736 KB
testcase_14 AC 102 ms
117,748 KB
testcase_15 AC 97 ms
117,736 KB
testcase_16 AC 43 ms
62,220 KB
testcase_17 AC 35 ms
53,460 KB
testcase_18 AC 49 ms
70,640 KB
testcase_19 AC 43 ms
62,240 KB
testcase_20 AC 53 ms
73,836 KB
testcase_21 AC 45 ms
64,672 KB
testcase_22 AC 34 ms
53,460 KB
testcase_23 AC 43 ms
64,268 KB
testcase_24 AC 42 ms
62,220 KB
testcase_25 AC 43 ms
62,220 KB
testcase_26 AC 49 ms
69,504 KB
testcase_27 AC 53 ms
72,208 KB
testcase_28 AC 99 ms
103,892 KB
testcase_29 AC 60 ms
80,020 KB
testcase_30 AC 57 ms
78,380 KB
testcase_31 AC 100 ms
111,252 KB
testcase_32 AC 74 ms
91,516 KB
testcase_33 AC 88 ms
103,716 KB
testcase_34 AC 100 ms
103,692 KB
testcase_35 AC 83 ms
99,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
a = list(map(int, input().split()))

acc = [0]
for i in a:
    acc.append(acc[-1] + i)

left = -0
right = 10**9

while abs(right - left) > 1:
    mid = (right + left) // 2
    flag = True
    for i in range(n):
        if acc[i + 1] >= (i + 1) * mid * m:
            continue
        else:
            flag = False
            break

    if flag:
        left = mid
    else:
        right = mid

print(left)
0