結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー kohei2019kohei2019
提出日時 2021-05-22 14:11:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 3,465 ms / 5,000 ms
コード長 405 bytes
コンパイル時間 480 ms
コンパイル使用メモリ 82,800 KB
実行使用メモリ 107,880 KB
最終ジャッジ日時 2024-04-26 01:23:35
合計ジャッジ時間 72,956 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3,110 ms
102,408 KB
testcase_01 AC 45 ms
60,296 KB
testcase_02 AC 1,321 ms
86,968 KB
testcase_03 AC 2,515 ms
98,176 KB
testcase_04 AC 3,006 ms
106,328 KB
testcase_05 AC 2,998 ms
106,196 KB
testcase_06 AC 2,958 ms
106,340 KB
testcase_07 AC 3,446 ms
102,288 KB
testcase_08 AC 3,465 ms
102,324 KB
testcase_09 AC 3,196 ms
102,384 KB
testcase_10 AC 2,683 ms
102,776 KB
testcase_11 AC 2,857 ms
106,268 KB
testcase_12 AC 2,438 ms
102,732 KB
testcase_13 AC 3,129 ms
104,720 KB
testcase_14 AC 3,285 ms
107,880 KB
testcase_15 AC 2,747 ms
104,452 KB
testcase_16 AC 3,024 ms
106,544 KB
testcase_17 AC 2,968 ms
106,308 KB
testcase_18 AC 2,957 ms
106,272 KB
testcase_19 AC 2,988 ms
102,424 KB
testcase_20 AC 2,964 ms
102,544 KB
testcase_21 AC 2,981 ms
102,324 KB
testcase_22 AC 2,667 ms
102,716 KB
testcase_23 AC 2,819 ms
106,084 KB
testcase_24 AC 39 ms
53,680 KB
testcase_25 AC 119 ms
75,960 KB
testcase_26 AC 75 ms
73,624 KB
testcase_27 AC 64 ms
69,400 KB
testcase_28 AC 604 ms
79,492 KB
testcase_29 AC 335 ms
76,448 KB
testcase_30 AC 128 ms
75,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

def is_ok(arg):
    cnt = 0
    for i in range(N):
        cnt += lsL[i]//(arg*(10**(-9)))
    return cnt >= K
 
def meguru_bisect(ng, ok):
    while (abs(ok - ng) > 1):
        mid = (ok + ng) // 2
        if is_ok(mid):
            ok = mid
        else:
            ng = mid
    return ok
print(meguru_bisect(10**40,0)*(10**(-9)))
0