結果

問題 No.2508 Discriminant
ユーザー 👑 KA37RI
提出日時 2023-07-10 19:27:25
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 952 ms / 2,000 ms
コード長 392 bytes
コンパイル時間 128 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,844 KB
最終ジャッジ日時 2024-09-16 22:18:03
合計ジャッジ時間 3,414 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

def toint(s):
	neg = s[0] == "-"
	if neg: s = s[1:]
	res = 0
	d = 4
	for i in reversed(range((len(s) + d - 1) // d)):
		block = s[-d*(i+1):-d*(i)]
		if i == 0: block = s[-d*(i+1):]
		res *= 10 ** d
		res += int(block)
	if neg:
	  return -res
	else:
		return res

a, p, q = [toint(x) for x in input().split()]
b = -a * (p + q)
c = a * p * q
ok = b ** 2 > 4 * a * c
print("Yes" if ok else "No")
0