結果
問題 |
No.67 よくある棒を切る問題 (1)
|
ユーザー |
![]() |
提出日時 | 2016-03-11 14:27:23 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 258 ms / 5,000 ms |
コード長 | 455 bytes |
コンパイル時間 | 372 ms |
コンパイル使用メモリ | 82,452 KB |
実行使用メモリ | 186,364 KB |
最終ジャッジ日時 | 2025-03-03 10:30:46 |
合計ジャッジ時間 | 7,727 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
import sys ''' 入出力ライブラリ ''' _allinput = [] for inp in sys.stdin: _allinput += inp.strip().split(" ") def _input(): for put in _allinput: yield put _obj = _input(); def __input(): return _obj.__next__() def nextInt(): return int(__input()) n = nextInt() lst = [nextInt() for i in range(0,n)] K = nextInt() l,r = 0, 1000000000 for _ in range(60): m = (l+r)/2 if sum([int(i/m) for i in lst]) < K: r = m else: l = m print(l)