結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 699 ms
102,348 KB
testcase_01 AC 41 ms
58,976 KB
testcase_02 AC 680 ms
87,120 KB
testcase_03 AC 1,257 ms
98,468 KB
testcase_04 AC 1,182 ms
106,440 KB
testcase_05 AC 1,170 ms
106,288 KB
testcase_06 AC 988 ms
106,328 KB
testcase_07 AC 1,788 ms
102,048 KB
testcase_08 AC 1,766 ms
101,912 KB
testcase_09 AC 1,367 ms
102,172 KB
testcase_10 AC 1,093 ms
103,112 KB
testcase_11 AC 1,138 ms
106,244 KB
testcase_12 AC 846 ms
102,740 KB
testcase_13 AC 1,556 ms
104,848 KB
testcase_14 AC 1,640 ms
108,020 KB
testcase_15 AC 1,209 ms
104,308 KB
testcase_16 AC 591 ms
106,576 KB
testcase_17 AC 525 ms
106,460 KB
testcase_18 AC 508 ms
106,484 KB
testcase_19 AC 548 ms
102,004 KB
testcase_20 AC 554 ms
102,120 KB
testcase_21 AC 518 ms
101,952 KB
testcase_22 AC 455 ms
102,972 KB
testcase_23 AC 480 ms
106,256 KB
testcase_24 AC 38 ms
52,780 KB
testcase_25 AC 90 ms
68,592 KB
testcase_26 AC 62 ms
65,508 KB
testcase_27 AC 54 ms
62,200 KB
testcase_28 AC 341 ms
79,568 KB
testcase_29 AC 206 ms
76,740 KB
testcase_30 AC 89 ms
68,560 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