結果
| 問題 |
No.955 ax^2+bx+c=0
|
| コンテスト | |
| ユーザー |
googol_S0
|
| 提出日時 | 2021-01-03 19:48:07 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 453 bytes |
| コンパイル時間 | 130 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 45,508 KB |
| 最終ジャッジ日時 | 2024-10-13 13:51:42 |
| 合計ジャッジ時間 | 61,041 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 14 WA * 108 |
ソースコード
import numpy as np
a,b,c=map(lambda x:int(x)*(10**18),input().split())
if a==b==0:
if c:
print(0)
else:
print(-1)
elif a==0:
x=sorted(set(np.roots([b,c])))
for i in range(len(x)-1,-1,-1):
if type(x[i])!=type(0.0):
del x[i]
print(len(x))
print(*x,sep='\n')
else:
x=sorted(set(np.roots([a,b,c])))
print(x)
for i in range(len(x)-1,-1,-1):
if type(x[i])!=type(0.0):
del x[i]
print(len(x))
print(*x,sep='\n')
googol_S0