結果

問題 No.1808 Fullgold Alchemist
ユーザー titiatitia
提出日時 2022-01-14 21:30:07
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 305 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 30,532 KB
最終ジャッジ日時 2023-08-12 17:44:02
合計ジャッジ時間 11,731 ms
ジャッジサーバーID
(参考情報)
judge10 / judge9
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,884 KB
testcase_01 AC 19 ms
7,816 KB
testcase_02 AC 15 ms
7,872 KB
testcase_03 AC 15 ms
7,908 KB
testcase_04 AC 15 ms
7,828 KB
testcase_05 AC 51 ms
11,332 KB
testcase_06 AC 295 ms
20,524 KB
testcase_07 AC 67 ms
20,516 KB
testcase_08 WA -
testcase_09 AC 373 ms
30,532 KB
testcase_10 AC 126 ms
30,452 KB
testcase_11 AC 352 ms
29,956 KB
testcase_12 AC 80 ms
26,704 KB
testcase_13 AC 494 ms
26,624 KB
testcase_14 AC 432 ms
28,220 KB
testcase_15 AC 384 ms
26,712 KB
testcase_16 AC 28 ms
8,572 KB
testcase_17 AC 15 ms
7,820 KB
testcase_18 AC 69 ms
11,060 KB
testcase_19 AC 19 ms
8,212 KB
testcase_20 AC 119 ms
12,700 KB
testcase_21 AC 35 ms
9,804 KB
testcase_22 AC 15 ms
7,932 KB
testcase_23 AC 30 ms
9,184 KB
testcase_24 AC 27 ms
8,588 KB
testcase_25 AC 23 ms
8,788 KB
testcase_26 AC 161 ms
10,968 KB
testcase_27 AC 195 ms
12,164 KB
testcase_28 AC 548 ms
27,964 KB
testcase_29 AC 216 ms
14,364 KB
testcase_30 AC 177 ms
13,924 KB
testcase_31 AC 708 ms
25,776 KB
testcase_32 AC 361 ms
19,088 KB
testcase_33 AC 630 ms
22,804 KB
testcase_34 AC 575 ms
27,796 KB
testcase_35 AC 676 ms
21,612 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

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

OK=0
NG=max(A)

while NG>OK+1:
    mid=(OK+NG)//2

    now=0
    for a in A:
        now+=a
        now-=mid*M

        if now<0:
            NG=mid
            break
    else:
        OK=mid

print(OK)
0