結果
問題 | No.67 よくある棒を切る問題 (1) |
ユーザー | rpy3cpp |
提出日時 | 2015-07-21 23:14:15 |
言語 | PyPy3 (7.3.13) |
結果 |
TLE
|
実行時間 | - |
コード長 | 464 bytes |
コンパイル時間 | 313 ms |
コンパイル使用メモリ | 87,428 KB |
実行使用メモリ | 108,120 KB |
最終ジャッジ日時 | 2023-09-22 21:03:20 |
合計ジャッジ時間 | 9,345 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 122 ms
104,404 KB |
testcase_01 | AC | 76 ms
76,780 KB |
testcase_02 | AC | 142 ms
88,380 KB |
testcase_03 | AC | 201 ms
99,496 KB |
testcase_04 | AC | 247 ms
108,120 KB |
testcase_05 | AC | 245 ms
108,096 KB |
testcase_06 | AC | 247 ms
108,072 KB |
testcase_07 | AC | 256 ms
100,780 KB |
testcase_08 | AC | 253 ms
100,704 KB |
testcase_09 | TLE | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
ソースコード
def read_data(): N = int(input()) Ls = list(map(int, input().split())) K = int(input()) return N, Ls, K def solve(N, Ls, K): eps = 10**-10 lower = max(Ls)/K - eps upper = max(Ls) + eps while upper - lower > eps: mid = (upper + lower) / 2 if sum(int(L/mid) for L in Ls) >= K: lower = mid else: upper = mid return (upper + lower) / 2 N, Ls, K = read_data() print(solve(N, Ls, K))