結果

問題 No.1162 Many Quotients hard
ユーザー rlangevin
提出日時 2023-02-03 08:58:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 82,384 KB
実行使用メモリ 52,096 KB
最終ジャッジ日時 2024-07-02 13:17:16
合計ジャッジ時間 3,268 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 42
権限があれば一括ダウンロードができます

ソースコード

diff #

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