結果

問題 No.1808 Fullgold Alchemist
ユーザー ThetaTheta
提出日時 2022-10-27 12:05:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 428 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 10,724 KB
実行使用メモリ 30,004 KB
最終ジャッジ日時 2023-09-18 05:48:57
合計ジャッジ時間 6,602 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,800 KB
testcase_01 AC 16 ms
7,944 KB
testcase_02 AC 16 ms
7,940 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 63 ms
12,180 KB
testcase_06 AC 117 ms
20,424 KB
testcase_07 AC 115 ms
20,552 KB
testcase_08 WA -
testcase_09 AC 105 ms
29,992 KB
testcase_10 AC 105 ms
29,948 KB
testcase_11 AC 103 ms
29,816 KB
testcase_12 AC 127 ms
28,000 KB
testcase_13 WA -
testcase_14 AC 162 ms
27,976 KB
testcase_15 AC 157 ms
27,824 KB
testcase_16 AC 19 ms
8,512 KB
testcase_17 AC 16 ms
7,808 KB
testcase_18 AC 34 ms
11,404 KB
testcase_19 AC 18 ms
8,212 KB
testcase_20 AC 50 ms
12,768 KB
testcase_21 AC 29 ms
10,200 KB
testcase_22 AC 17 ms
7,812 KB
testcase_23 AC 25 ms
9,352 KB
testcase_24 WA -
testcase_25 AC 20 ms
8,792 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

    sum_ = A[0]
    for idx in range(1, N):
        if A[idx] <= sum_ // idx:
            sum_ += A[idx]
        else:
            try:
                A[idx+1] += A[idx] - sum_ // idx
            except IndexError:
                pass
            sum_ += sum_ // idx

    print((sum_ // idx)//M)


if __name__ == "__main__":
    main()
0