結果
| 問題 |
No.1808 Fullgold Alchemist
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-18 14:50:02 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 128 ms / 2,000 ms |
| コード長 | 322 bytes |
| コンパイル時間 | 355 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 113,792 KB |
| 最終ジャッジ日時 | 2024-11-23 13:21:53 |
| 合計ジャッジ時間 | 4,676 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
ソースコード
n,m=map(int,input().split())
a=list(map(int,input().split()))
from itertools import accumulate
s=list(accumulate(a))
def check(x):
for i in range(n):
if s[i]<(i+1)*m*x:
return False
return True
l=0
r=10**15
while r-l>1:
x=(r+l)//2
if check(x):
l=x
else:
r=x
print(l)