結果

問題 No.1808 Fullgold Alchemist
ユーザー mrngmrng
提出日時 2022-02-05 14:26:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 220 bytes
コンパイル時間 380 ms
コンパイル使用メモリ 87,132 KB
実行使用メモリ 107,252 KB
最終ジャッジ日時 2023-09-02 06:37:35
合計ジャッジ時間 6,226 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,376 KB
testcase_01 AC 76 ms
71,196 KB
testcase_02 AC 76 ms
71,348 KB
testcase_03 AC 77 ms
71,240 KB
testcase_04 AC 77 ms
71,276 KB
testcase_05 AC 110 ms
103,756 KB
testcase_06 AC 122 ms
107,252 KB
testcase_07 AC 115 ms
106,420 KB
testcase_08 AC 158 ms
99,732 KB
testcase_09 AC 133 ms
99,760 KB
testcase_10 AC 127 ms
99,676 KB
testcase_11 AC 132 ms
100,384 KB
testcase_12 AC 115 ms
106,048 KB
testcase_13 AC 126 ms
106,764 KB
testcase_14 AC 127 ms
106,584 KB
testcase_15 AC 124 ms
106,888 KB
testcase_16 AC 80 ms
76,284 KB
testcase_17 AC 75 ms
71,224 KB
testcase_18 AC 86 ms
79,484 KB
testcase_19 AC 81 ms
76,228 KB
testcase_20 AC 91 ms
81,720 KB
testcase_21 AC 83 ms
76,520 KB
testcase_22 AC 74 ms
71,544 KB
testcase_23 AC 82 ms
76,160 KB
testcase_24 AC 81 ms
76,344 KB
testcase_25 AC 81 ms
76,328 KB
testcase_26 AC 86 ms
78,628 KB
testcase_27 AC 90 ms
80,472 KB
testcase_28 AC 132 ms
99,976 KB
testcase_29 AC 95 ms
84,372 KB
testcase_30 AC 93 ms
83,488 KB
testcase_31 AC 126 ms
101,740 KB
testcase_32 AC 103 ms
91,256 KB
testcase_33 AC 120 ms
98,436 KB
testcase_34 AC 130 ms
99,828 KB
testcase_35 AC 116 ms
95,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int,input().split())
a = list(map(int,input().split()))
ok,ng = 0,10**9+1
while ng-ok>1:
	m = (ok+ng)//2
	p = 0
	for i in range(n):
		if a[i]+p<k*m:
			ng = m
			break
		p -= k*m-a[i]
	else:
		ok = m
print(ok)
0