結果
問題 |
No.1162 Many Quotients hard
|
ユーザー |
|
提出日時 | 2022-05-20 14:21:29 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 37 ms / 2,000 ms |
コード長 | 326 bytes |
コンパイル時間 | 173 ms |
コンパイル使用メモリ | 82,384 KB |
実行使用メモリ | 54,064 KB |
最終ジャッジ日時 | 2024-09-19 22:16:53 |
合計ジャッジ時間 | 3,067 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 42 |
ソースコード
N = int(input()) import sys s = set() if N <= 100: for i in range(1,N + 5): s.add(N // i) print(len(s) - 1) exit() start = 1 end = N while end - start > 1: mid = end + start >> 1 if mid * (mid + 1) <= N: start = mid else: end = mid k = start ans = k + N // (k + 1) print(ans)