結果
| 問題 |
No.955 ax^2+bx+c=0
|
| コンテスト | |
| ユーザー |
shooooo
|
| 提出日時 | 2020-01-01 17:33:01 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 399 bytes |
| コンパイル時間 | 156 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-11-22 11:31:24 |
| 合計ジャッジ時間 | 7,473 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 89 WA * 33 |
ソースコード
import math
a,b,c=map(int,input().split())
if a!=0:
if b**2-4*a*c<0:
print(0)
elif b**2-4*a*c==0:
print(1)
print((-b-math.sqrt(b**2-4*a*c))/(2*a))
else:
x1=(-b-math.sqrt(b**2-4*a*c))/(2*a)
x2=(-b+math.sqrt(b**2-4*a*c))/(2*a)
print(2)
print(x1)
print(x2)
else:
if b==0:
if c==0:
print(-1)
else:
print(0)
else:
print(1)
print(-c/b)
shooooo