結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー lllllll88938494lllllll88938494
提出日時 2022-06-02 15:34:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 282 bytes
コンパイル時間 230 ms
コンパイル使用メモリ 81,588 KB
実行使用メモリ 107,192 KB
最終ジャッジ日時 2023-10-21 01:10:15
合計ジャッジ時間 19,568 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 496 ms
101,736 KB
testcase_01 AC 43 ms
59,560 KB
testcase_02 AC 498 ms
81,420 KB
testcase_03 AC 913 ms
95,684 KB
testcase_04 AC 863 ms
104,372 KB
testcase_05 AC 856 ms
105,712 KB
testcase_06 AC 705 ms
105,448 KB
testcase_07 AC 1,276 ms
101,348 KB
testcase_08 AC 1,261 ms
101,348 KB
testcase_09 AC 1,000 ms
101,348 KB
testcase_10 AC 785 ms
99,712 KB
testcase_11 AC 819 ms
103,544 KB
testcase_12 AC 630 ms
99,528 KB
testcase_13 AC 1,175 ms
103,816 KB
testcase_14 AC 1,198 ms
107,192 KB
testcase_15 AC 869 ms
103,500 KB
testcase_16 AC 437 ms
104,248 KB
testcase_17 AC 387 ms
103,816 KB
testcase_18 AC 376 ms
103,812 KB
testcase_19 AC 407 ms
101,348 KB
testcase_20 AC 387 ms
101,348 KB
testcase_21 AC 387 ms
101,348 KB
testcase_22 AC 341 ms
99,248 KB
testcase_23 AC 359 ms
103,052 KB
testcase_24 WA -
testcase_25 AC 78 ms
62,068 KB
testcase_26 AC 60 ms
62,068 KB
testcase_27 AC 56 ms
61,636 KB
testcase_28 AC 249 ms
69,636 KB
testcase_29 AC 155 ms
66,736 KB
testcase_30 AC 77 ms
62,068 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
ns=list(map(int,input().split()))
k=int(input())

def  cal(x):
    cnt=0
    for i in range(n):
        cnt+= ns[i] // x
    return cnt

l=0
r=10**10

for i in range(60):
    mid= (l+r) / 2
    if cal(mid) < k:
        r=mid
    else:
        l=mid

print(r)
        
0