結果

問題 No.1139 Slime Race
ユーザー ntk-ta01ntk-ta01
提出日時 2020-07-31 22:48:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 140 ms / 2,000 ms
コード長 322 bytes
コンパイル時間 956 ms
コンパイル使用メモリ 87,012 KB
実行使用メモリ 88,340 KB
最終ジャッジ日時 2023-09-15 02:56:54
合計ジャッジ時間 4,565 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,336 KB
testcase_01 AC 72 ms
71,324 KB
testcase_02 AC 74 ms
71,420 KB
testcase_03 AC 76 ms
75,148 KB
testcase_04 AC 72 ms
71,348 KB
testcase_05 AC 74 ms
71,100 KB
testcase_06 AC 79 ms
75,736 KB
testcase_07 AC 73 ms
71,352 KB
testcase_08 AC 72 ms
71,296 KB
testcase_09 AC 74 ms
71,100 KB
testcase_10 AC 101 ms
85,648 KB
testcase_11 AC 99 ms
85,028 KB
testcase_12 AC 99 ms
87,364 KB
testcase_13 AC 76 ms
71,372 KB
testcase_14 AC 99 ms
85,736 KB
testcase_15 AC 128 ms
85,584 KB
testcase_16 AC 101 ms
86,964 KB
testcase_17 AC 99 ms
85,960 KB
testcase_18 AC 93 ms
83,544 KB
testcase_19 AC 93 ms
80,592 KB
testcase_20 AC 91 ms
80,612 KB
testcase_21 AC 96 ms
83,364 KB
testcase_22 AC 100 ms
86,008 KB
testcase_23 AC 140 ms
88,340 KB
testcase_24 AC 73 ms
71,440 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,D=(int(i) for i in input().split())
_=input()
V=[int(i) for i in input().split()]
def k(t):
    d=0
    for i in range(N):
        d+=V[i]*t
    if d>=D:
        return True
    else:
        return False
ng=0
ok=D
while abs(ok-ng)>1:
    mid = (ng+ok)//2
    if k(mid):
        ok=mid
    else:
        ng=mid
print(ok)
0