結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー syunsukesyunsuke
提出日時 2019-09-23 20:57:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 2,201 ms / 5,000 ms
コード長 217 bytes
コンパイル時間 823 ms
コンパイル使用メモリ 82,456 KB
実行使用メモリ 108,224 KB
最終ジャッジ日時 2024-04-26 00:49:32
合計ジャッジ時間 31,994 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 815 ms
102,652 KB
testcase_01 AC 43 ms
60,344 KB
testcase_02 AC 847 ms
87,348 KB
testcase_03 AC 1,594 ms
98,348 KB
testcase_04 AC 1,489 ms
106,448 KB
testcase_05 AC 1,482 ms
106,744 KB
testcase_06 AC 1,204 ms
106,484 KB
testcase_07 AC 2,194 ms
101,984 KB
testcase_08 AC 2,201 ms
102,108 KB
testcase_09 AC 1,696 ms
101,968 KB
testcase_10 AC 1,371 ms
103,028 KB
testcase_11 AC 1,433 ms
106,448 KB
testcase_12 AC 1,037 ms
102,944 KB
testcase_13 AC 1,989 ms
104,844 KB
testcase_14 AC 2,143 ms
108,224 KB
testcase_15 AC 1,492 ms
104,688 KB
testcase_16 AC 698 ms
106,168 KB
testcase_17 AC 613 ms
106,632 KB
testcase_18 AC 592 ms
106,664 KB
testcase_19 AC 641 ms
101,948 KB
testcase_20 AC 650 ms
102,140 KB
testcase_21 AC 605 ms
102,140 KB
testcase_22 AC 533 ms
102,688 KB
testcase_23 AC 572 ms
106,048 KB
testcase_24 AC 38 ms
52,200 KB
testcase_25 AC 96 ms
69,960 KB
testcase_26 AC 64 ms
65,648 KB
testcase_27 AC 57 ms
61,740 KB
testcase_28 AC 404 ms
79,640 KB
testcase_29 AC 237 ms
76,704 KB
testcase_30 AC 99 ms
70,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

H=10**9
L=0

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