結果

問題 No.1162 Many Quotients hard
ユーザー rlangevin
提出日時 2023-02-03 08:58:55
言語 PyPy3
(8.0.1 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 34 ms / 2,000 ms
+ 93µs
コード長 208 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 264 ms
コンパイル使用メモリ 64,512 KB
実行使用メモリ 53,632 KB
最終ジャッジ日時 2026-10-29 19:29:17
合計ジャッジ時間 3,733 ms
ジャッジサーバーID
(参考情報)
judge7_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 43
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(input())
yes = 1
no = 10 ** 18
while no - yes != 1:
    mid = (yes + no)//2
    if mid ** 2 <= N:
        yes = mid
    else:
        no = mid
ans = yes * 2
if N // yes == yes:
    ans -= 1
print(ans)
0