結果
| 問題 |
No.67 よくある棒を切る問題 (1)
|
| コンテスト | |
| ユーザー |
Ryota_Py
|
| 提出日時 | 2022-04-03 20:28:24 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 1,180 ms / 5,000 ms |
| コード長 | 690 bytes |
| コンパイル時間 | 230 ms |
| コンパイル使用メモリ | 82,444 KB |
| 実行使用メモリ | 107,236 KB |
| 最終ジャッジ日時 | 2025-03-03 11:57:01 |
| 合計ジャッジ時間 | 22,249 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
import sys,math,collections,itertools
from collections import deque
INF = 10**18
def I(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))
def S(): return input()
def LS(): return list(input().split())
def TS(): return tuple(input().split())
def lcm(a, b): return a * b // math.gcd(a, b)
MOD1 = 10**9+7 #500000004
MOD2 = 998244353 #499122177
sys.setrecursionlimit(10**9)
a = I()
l = LI()
k = I()
m = 10**(-9)
M = 10**9
for i in range(100):
mid = (m+M)/2
s = 0
for j in range(a):
s += l[j]//mid
if s >= k:
m = mid
else:
M = mid
print(m)
Ryota_Py