結果

問題 No.1808 Fullgold Alchemist
ユーザー MasKoaTSMasKoaTS
提出日時 2022-01-12 21:46:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 105 ms / 2,000 ms
コード長 326 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 82,316 KB
実行使用メモリ 117,284 KB
最終ジャッジ日時 2024-04-27 12:12:52
合計ジャッジ時間 4,871 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,128 KB
testcase_01 AC 35 ms
52,860 KB
testcase_02 AC 35 ms
52,068 KB
testcase_03 AC 32 ms
53,364 KB
testcase_04 AC 32 ms
52,200 KB
testcase_05 AC 87 ms
117,284 KB
testcase_06 AC 87 ms
110,364 KB
testcase_07 AC 88 ms
110,356 KB
testcase_08 AC 105 ms
112,212 KB
testcase_09 AC 102 ms
112,320 KB
testcase_10 AC 100 ms
112,420 KB
testcase_11 AC 102 ms
112,800 KB
testcase_12 AC 91 ms
113,520 KB
testcase_13 AC 94 ms
113,588 KB
testcase_14 AC 94 ms
113,356 KB
testcase_15 AC 90 ms
113,720 KB
testcase_16 AC 41 ms
63,024 KB
testcase_17 AC 32 ms
52,496 KB
testcase_18 AC 49 ms
71,444 KB
testcase_19 AC 39 ms
60,684 KB
testcase_20 AC 50 ms
75,388 KB
testcase_21 AC 42 ms
66,008 KB
testcase_22 AC 32 ms
52,412 KB
testcase_23 AC 41 ms
64,916 KB
testcase_24 AC 41 ms
62,844 KB
testcase_25 AC 40 ms
62,580 KB
testcase_26 AC 45 ms
69,276 KB
testcase_27 AC 48 ms
74,156 KB
testcase_28 AC 90 ms
104,004 KB
testcase_29 AC 55 ms
81,180 KB
testcase_30 AC 55 ms
79,744 KB
testcase_31 AC 83 ms
104,636 KB
testcase_32 AC 67 ms
95,096 KB
testcase_33 AC 85 ms
106,360 KB
testcase_34 AC 87 ms
103,600 KB
testcase_35 AC 79 ms
102,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools

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

if not(1 <= n <= 2 * 10 ** 5 and 1 <= m <= 10 ** 9):
    exit(1)
if any(not(0 <= i <= 10 ** 9) for i in a):
    exit(1)

ans = s[0] // m
for i in range(1,n):
	ans = min(ans, s[i] // (m * (i+1)))

print(ans)
0