結果

問題 No.1808 Fullgold Alchemist
ユーザー ThetaTheta
提出日時 2022-10-27 12:06:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 163 ms / 2,000 ms
コード長 426 bytes
コンパイル時間 422 ms
コンパイル使用メモリ 10,716 KB
実行使用メモリ 29,980 KB
最終ジャッジ日時 2023-09-18 05:49:27
合計ジャッジ時間 4,562 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,780 KB
testcase_01 AC 15 ms
7,796 KB
testcase_02 AC 16 ms
7,772 KB
testcase_03 AC 15 ms
7,860 KB
testcase_04 AC 16 ms
7,936 KB
testcase_05 AC 63 ms
12,164 KB
testcase_06 AC 117 ms
20,416 KB
testcase_07 AC 116 ms
20,560 KB
testcase_08 AC 107 ms
29,980 KB
testcase_09 AC 108 ms
29,932 KB
testcase_10 AC 106 ms
29,912 KB
testcase_11 AC 104 ms
29,952 KB
testcase_12 AC 126 ms
28,024 KB
testcase_13 AC 163 ms
28,068 KB
testcase_14 AC 160 ms
28,032 KB
testcase_15 AC 158 ms
28,028 KB
testcase_16 AC 19 ms
8,520 KB
testcase_17 AC 15 ms
7,812 KB
testcase_18 AC 34 ms
11,432 KB
testcase_19 AC 18 ms
8,360 KB
testcase_20 AC 49 ms
12,788 KB
testcase_21 AC 29 ms
10,104 KB
testcase_22 AC 16 ms
7,780 KB
testcase_23 AC 25 ms
9,296 KB
testcase_24 AC 20 ms
8,708 KB
testcase_25 AC 21 ms
8,664 KB
testcase_26 AC 36 ms
11,528 KB
testcase_27 AC 44 ms
12,444 KB
testcase_28 AC 151 ms
28,132 KB
testcase_29 AC 60 ms
14,384 KB
testcase_30 AC 55 ms
13,720 KB
testcase_31 AC 136 ms
26,056 KB
testcase_32 AC 89 ms
18,828 KB
testcase_33 AC 115 ms
22,960 KB
testcase_34 AC 148 ms
27,824 KB
testcase_35 AC 108 ms
21,716 KB
権限があれば一括ダウンロードができます

ソースコード

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_ // N)//M)


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