結果
問題 |
No.67 よくある棒を切る問題 (1)
|
ユーザー |
![]() |
提出日時 | 2022-03-06 14:46:44 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,042 ms / 5,000 ms |
コード長 | 344 bytes |
コンパイル時間 | 230 ms |
コンパイル使用メモリ | 82,668 KB |
実行使用メモリ | 107,488 KB |
最終ジャッジ日時 | 2025-03-03 11:56:40 |
合計ジャッジ時間 | 20,544 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
def Check(x): cnt = 0 for i in range(N): cnt += L[i] // x if cnt >= K: return True else: return False N = int(input()) L = list(map(int,input().split())) K = int(input()) ok = 0 ng = max(L) + 1 for _ in range(100): x = (ok + ng) / 2 if Check(x): ok = x else: ng = x print(ok)