結果

問題 No.1808 Fullgold Alchemist
ユーザー ああいいああいい
提出日時 2022-01-14 21:39:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 393 bytes
コンパイル時間 288 ms
コンパイル使用メモリ 82,828 KB
実行使用メモリ 103,340 KB
最終ジャッジ日時 2024-04-30 13:29:22
合計ジャッジ時間 4,012 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,176 KB
testcase_01 AC 37 ms
52,948 KB
testcase_02 AC 38 ms
52,312 KB
testcase_03 AC 37 ms
52,020 KB
testcase_04 AC 38 ms
52,724 KB
testcase_05 AC 72 ms
96,256 KB
testcase_06 AC 84 ms
103,340 KB
testcase_07 AC 80 ms
102,836 KB
testcase_08 AC 115 ms
102,036 KB
testcase_09 AC 100 ms
102,160 KB
testcase_10 AC 95 ms
102,268 KB
testcase_11 AC 99 ms
102,244 KB
testcase_12 AC 80 ms
102,460 KB
testcase_13 AC 86 ms
102,956 KB
testcase_14 AC 89 ms
102,464 KB
testcase_15 AC 87 ms
102,952 KB
testcase_16 AC 43 ms
60,844 KB
testcase_17 AC 37 ms
52,464 KB
testcase_18 AC 50 ms
66,416 KB
testcase_19 AC 43 ms
59,900 KB
testcase_20 AC 53 ms
69,840 KB
testcase_21 AC 45 ms
63,104 KB
testcase_22 AC 37 ms
52,720 KB
testcase_23 AC 43 ms
62,572 KB
testcase_24 AC 43 ms
60,288 KB
testcase_25 AC 44 ms
61,048 KB
testcase_26 AC 50 ms
65,300 KB
testcase_27 AC 52 ms
68,352 KB
testcase_28 AC 89 ms
103,004 KB
testcase_29 AC 57 ms
73,780 KB
testcase_30 AC 55 ms
72,600 KB
testcase_31 AC 85 ms
98,216 KB
testcase_32 AC 67 ms
84,508 KB
testcase_33 AC 79 ms
92,888 KB
testcase_34 AC 87 ms
102,536 KB
testcase_35 AC 74 ms
89,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

def check(L):
    stack = 0
    for a in A:
        if stack + a < L * M:
            return False
        else:
            stack = stack + a - L * M
    return True
end = 10 ** 9 + 1
start = 0
while end - start > 1:
    mid = (start + end) // 2
    if check(mid):
        start = mid
    else:
        end = mid
print(start)
0