結果

問題 No.1808 Fullgold Alchemist
ユーザー MasKoaTSMasKoaTS
提出日時 2021-09-28 20:58:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 333 bytes
コンパイル時間 311 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 113,584 KB
最終ジャッジ日時 2024-04-08 14:59:47
合計ジャッジ時間 4,110 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,460 KB
testcase_01 AC 35 ms
53,460 KB
testcase_02 AC 38 ms
53,460 KB
testcase_03 AC 35 ms
53,460 KB
testcase_04 AC 36 ms
53,460 KB
testcase_05 AC 82 ms
113,584 KB
testcase_06 AC 92 ms
110,192 KB
testcase_07 AC 87 ms
110,192 KB
testcase_08 AC 119 ms
111,944 KB
testcase_09 AC 109 ms
111,940 KB
testcase_10 AC 105 ms
111,936 KB
testcase_11 AC 107 ms
111,880 KB
testcase_12 AC 93 ms
113,264 KB
testcase_13 AC 98 ms
113,264 KB
testcase_14 AC 99 ms
113,276 KB
testcase_15 AC 97 ms
113,264 KB
testcase_16 AC 42 ms
61,836 KB
testcase_17 AC 36 ms
53,460 KB
testcase_18 AC 48 ms
70,484 KB
testcase_19 AC 41 ms
59,712 KB
testcase_20 AC 54 ms
73,836 KB
testcase_21 AC 45 ms
64,288 KB
testcase_22 AC 36 ms
53,460 KB
testcase_23 AC 43 ms
63,884 KB
testcase_24 AC 42 ms
61,848 KB
testcase_25 AC 42 ms
61,836 KB
testcase_26 AC 48 ms
69,108 KB
testcase_27 AC 51 ms
71,824 KB
testcase_28 AC 96 ms
103,648 KB
testcase_29 AC 58 ms
79,488 KB
testcase_30 AC 56 ms
77,896 KB
testcase_31 AC 91 ms
104,096 KB
testcase_32 AC 73 ms
93,040 KB
testcase_33 AC 88 ms
104,740 KB
testcase_34 AC 95 ms
103,576 KB
testcase_35 AC 79 ms
99,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools

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

def func(k):
	t = m * k
	res = True
	for i in s:
		if(i < t):
			res = False
			break
		t += m * k
	return res

ok = 0
ng = 10**9+1
while(ng-ok > 1):
	k = (ok+ng)//2
	if(func(k)):
		ok = k
	else:
		ng = k
print(ok)
0