結果

問題 No.2420 Simple Problem
ユーザー Seed57_cash
提出日時 2023-06-18 19:59:52
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 218 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 65,280 KB
最終ジャッジ日時 2024-06-28 11:29:16
合計ジャッジ時間 8,043 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 1
other RE * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

a, b = map(int, input().split())

r = math.sqrt(a) + math.sqrt(b)
res = math.ceil(r)

# try res - 1
# a + b + math.sqrt(a * b) = res
while ((res - 1) ** 2 - a - b) ** 2 > 4 * a * b:
	res -= 1

print(res)

0