結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー syunsukesyunsuke
提出日時 2019-09-23 21:04:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,790 ms / 5,000 ms
コード長 216 bytes
コンパイル時間 511 ms
コンパイル使用メモリ 82,540 KB
実行使用メモリ 108,116 KB
最終ジャッジ日時 2024-04-26 00:48:54
合計ジャッジ時間 26,162 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 711 ms
102,380 KB
testcase_01 AC 42 ms
59,376 KB
testcase_02 AC 691 ms
87,348 KB
testcase_03 AC 1,303 ms
98,320 KB
testcase_04 AC 1,210 ms
106,316 KB
testcase_05 AC 1,221 ms
106,416 KB
testcase_06 AC 991 ms
106,672 KB
testcase_07 AC 1,763 ms
102,004 KB
testcase_08 AC 1,790 ms
102,260 KB
testcase_09 AC 1,361 ms
102,032 KB
testcase_10 AC 1,114 ms
103,060 KB
testcase_11 AC 1,161 ms
106,032 KB
testcase_12 AC 823 ms
102,736 KB
testcase_13 AC 1,603 ms
104,736 KB
testcase_14 AC 1,695 ms
108,116 KB
testcase_15 AC 1,178 ms
104,152 KB
testcase_16 AC 575 ms
106,448 KB
testcase_17 AC 524 ms
106,376 KB
testcase_18 AC 503 ms
106,664 KB
testcase_19 AC 548 ms
102,140 KB
testcase_20 AC 558 ms
102,256 KB
testcase_21 AC 514 ms
102,136 KB
testcase_22 AC 439 ms
103,068 KB
testcase_23 AC 454 ms
106,216 KB
testcase_24 AC 38 ms
52,320 KB
testcase_25 AC 88 ms
68,396 KB
testcase_26 AC 64 ms
65,680 KB
testcase_27 AC 55 ms
61,944 KB
testcase_28 AC 341 ms
79,548 KB
testcase_29 AC 207 ms
76,880 KB
testcase_30 AC 90 ms
68,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
K=int(input())

H=10**9
L=0

for i in range(80):
    M=(H+L)/2
    ans=0
    for l in A:
        ans+=l//M
    if ans<K:
        H=M
    else:
        L=M
print(M)
    
0