結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー Bs_bekkuBs_bekku
提出日時 2020-03-29 07:39:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 2,268 ms / 5,000 ms
コード長 352 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 32,700 KB
最終ジャッジ日時 2024-04-26 01:02:36
合計ジャッジ時間 37,920 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,081 ms
32,700 KB
testcase_01 AC 30 ms
10,880 KB
testcase_02 AC 877 ms
19,036 KB
testcase_03 AC 1,646 ms
26,584 KB
testcase_04 AC 1,930 ms
29,368 KB
testcase_05 AC 1,897 ms
29,368 KB
testcase_06 AC 1,540 ms
29,364 KB
testcase_07 AC 2,268 ms
32,676 KB
testcase_08 AC 2,215 ms
32,668 KB
testcase_09 AC 1,774 ms
32,672 KB
testcase_10 AC 1,749 ms
26,576 KB
testcase_11 AC 1,860 ms
28,680 KB
testcase_12 AC 1,365 ms
26,068 KB
testcase_13 AC 2,038 ms
31,160 KB
testcase_14 AC 2,135 ms
31,596 KB
testcase_15 AC 1,560 ms
29,408 KB
testcase_16 AC 1,086 ms
29,372 KB
testcase_17 AC 1,020 ms
29,356 KB
testcase_18 AC 979 ms
29,360 KB
testcase_19 AC 952 ms
32,668 KB
testcase_20 AC 946 ms
32,664 KB
testcase_21 AC 958 ms
32,664 KB
testcase_22 AC 898 ms
27,664 KB
testcase_23 AC 946 ms
28,556 KB
testcase_24 AC 29 ms
10,880 KB
testcase_25 AC 82 ms
11,136 KB
testcase_26 AC 49 ms
10,880 KB
testcase_27 AC 44 ms
10,880 KB
testcase_28 AC 408 ms
14,320 KB
testcase_29 AC 230 ms
12,416 KB
testcase_30 AC 83 ms
11,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
l=list(map(int,input().split()))
k=int(input())

left=0
right=max(l)+1
def wari(m,l,k):
  ans=0
  for i in l:
    ans+=i//m
  if ans<k:
    return True
  else:
    return False
while True:
  mid=(left+right)/2
  if wari(mid,l,k):
    if mid==right:
      break
    right=mid
  else:
    if mid==left:
      break
    left=mid
print(left)
0