結果

問題 No.955 ax^2+bx+c=0
ユーザー persimmon-persimmon
提出日時 2021-06-15 10:46:56
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 326 bytes
コンパイル時間 2,311 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 52,352 KB
最終ジャッジ日時 2024-12-26 05:34:14
合計ジャッジ時間 10,843 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 93 WA * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c=map(int,input().split())
if a==0 and b==0 and c==0:
	print(-1)
elif a==0 and b==0:
	print(0)
elif a==0:
	print(1)
	print(-c/b)
else:
	tmp=-c+b**2/(4*a)
	tmp/=a
	if tmp<0:
		print(0)
	elif tmp==0:
		print(1)
		print(-b/(2*a))
	else:
		import math
		tmp=math.sqrt(tmp)
		print(2)
		print(-tmp-b/(2*a))
		print(tmp-b/(2*a))
0