結果

問題 No.1157 Many Quotients easy
ユーザー rlangevinrlangevin
提出日時 2024-09-01 18:19:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 37 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 445 ms
コンパイル使用メモリ 82,564 KB
実行使用メモリ 53,408 KB
最終ジャッジ日時 2024-09-01 18:19:26
合計ジャッジ時間 2,745 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

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