結果
問題 | No.67 よくある棒を切る問題 (1) |
ユーザー | takakin |
提出日時 | 2020-05-03 20:21:11 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 312 bytes |
コンパイル時間 | 70 ms |
コンパイル使用メモリ | 11,052 KB |
実行使用メモリ | 30,104 KB |
最終ジャッジ日時 | 2023-09-04 21:10:36 |
合計ジャッジ時間 | 35,808 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1,615 ms
30,068 KB |
testcase_01 | AC | 16 ms
7,800 KB |
testcase_02 | AC | 753 ms
16,668 KB |
testcase_03 | AC | 1,444 ms
24,228 KB |
testcase_04 | AC | 1,991 ms
28,996 KB |
testcase_05 | AC | 1,995 ms
29,152 KB |
testcase_06 | AC | 1,855 ms
29,004 KB |
testcase_07 | AC | 1,992 ms
30,072 KB |
testcase_08 | AC | 2,000 ms
30,104 KB |
testcase_09 | AC | 1,948 ms
30,060 KB |
testcase_10 | AC | 1,796 ms
28,252 KB |
testcase_11 | AC | 1,895 ms
28,212 KB |
testcase_12 | AC | 1,586 ms
25,588 KB |
testcase_13 | AC | 1,826 ms
28,568 KB |
testcase_14 | AC | 1,891 ms
29,284 KB |
testcase_15 | AC | 1,638 ms
26,920 KB |
testcase_16 | TLE | - |
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 | -- | - |
ソースコード
import sys input=lambda: sys.stdin.readline().rstrip() n=int(input()) L=[int(i) for i in input().split()] k=int(input()) def chk(x): ct=0 for ln in L: ct+=int(ln/x) return ct>=k l,r=0,max(L) t=0 while r-l>10**(-9) and t<=10**5: mid=(l+r)/2 if chk(mid): l=mid else: r=mid t+=1 print(l)