結果
問題 | No.67 よくある棒を切る問題 (1) |
ユーザー | Yamada |
提出日時 | 2019-01-17 16:37:33 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 448 bytes |
コンパイル時間 | 90 ms |
コンパイル使用メモリ | 11,100 KB |
実行使用メモリ | 30,312 KB |
最終ジャッジ日時 | 2023-09-14 02:02:55 |
合計ジャッジ時間 | 30,439 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1,208 ms
30,232 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 1,308 ms
30,236 KB |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 1,122 ms
27,036 KB |
testcase_16 | AC | 1,222 ms
29,084 KB |
testcase_17 | AC | 1,219 ms
29,092 KB |
testcase_18 | AC | 1,121 ms
29,080 KB |
testcase_19 | AC | 1,218 ms
30,132 KB |
testcase_20 | AC | 1,129 ms
30,116 KB |
testcase_21 | AC | 1,133 ms
30,144 KB |
testcase_22 | AC | 1,010 ms
28,272 KB |
testcase_23 | AC | 1,066 ms
28,420 KB |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
ソースコード
N =int(input()) li =[int(i)for i in input().split()] K =int(input()) def wa(L,d): n = 0 for i in L: n += int(i/d) return n def nibuntansaku(l,s): left = max(l)+1 right =0 while abs(right -left) > 10**(-3): mid = (left + right)/2.0 if wa(l,mid) >= s: right =mid else: left =mid return right #s以上の値をとる最小のindexが返る print(nibuntansaku(li,K))