結果

問題 No.955 ax^2+bx+c=0
ユーザー finefine
提出日時 2019-12-20 01:00:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 467 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 10,780 KB
実行使用メモリ 30,556 KB
最終ジャッジ日時 2023-09-21 07:53:52
合計ジャッジ時間 22,172 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 144 ms
30,088 KB
testcase_02 AC 135 ms
30,364 KB
testcase_03 AC 136 ms
29,436 KB
testcase_04 AC 138 ms
29,436 KB
testcase_05 AC 135 ms
29,372 KB
testcase_06 AC 136 ms
29,440 KB
testcase_07 AC 138 ms
29,444 KB
testcase_08 AC 137 ms
29,436 KB
testcase_09 AC 139 ms
29,444 KB
testcase_10 AC 140 ms
29,324 KB
testcase_11 AC 141 ms
29,532 KB
testcase_12 AC 140 ms
29,464 KB
testcase_13 AC 137 ms
29,500 KB
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 AC 138 ms
29,400 KB
testcase_25 AC 139 ms
29,440 KB
testcase_26 AC 142 ms
29,356 KB
testcase_27 AC 136 ms
29,408 KB
testcase_28 AC 136 ms
29,536 KB
testcase_29 AC 136 ms
29,336 KB
testcase_30 AC 137 ms
29,408 KB
testcase_31 AC 139 ms
29,408 KB
testcase_32 AC 136 ms
29,388 KB
testcase_33 AC 136 ms
29,400 KB
testcase_34 AC 136 ms
30,164 KB
testcase_35 AC 137 ms
30,192 KB
testcase_36 AC 135 ms
30,176 KB
testcase_37 AC 135 ms
30,104 KB
testcase_38 AC 138 ms
30,280 KB
testcase_39 AC 137 ms
30,204 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 WA -
testcase_52 AC 137 ms
30,156 KB
testcase_53 AC 137 ms
30,244 KB
testcase_54 AC 137 ms
30,104 KB
testcase_55 AC 137 ms
30,072 KB
testcase_56 AC 135 ms
30,148 KB
testcase_57 AC 136 ms
30,100 KB
testcase_58 WA -
testcase_59 WA -
testcase_60 WA -
testcase_61 WA -
testcase_62 AC 136 ms
30,100 KB
testcase_63 AC 137 ms
30,192 KB
testcase_64 AC 137 ms
30,248 KB
testcase_65 WA -
testcase_66 AC 136 ms
30,292 KB
testcase_67 AC 136 ms
30,256 KB
testcase_68 AC 136 ms
30,264 KB
testcase_69 WA -
testcase_70 AC 135 ms
30,160 KB
testcase_71 AC 135 ms
30,220 KB
testcase_72 AC 136 ms
30,200 KB
testcase_73 AC 136 ms
30,160 KB
testcase_74 WA -
testcase_75 AC 135 ms
30,360 KB
testcase_76 AC 131 ms
30,216 KB
testcase_77 WA -
testcase_78 WA -
testcase_79 AC 135 ms
30,152 KB
testcase_80 AC 134 ms
30,220 KB
testcase_81 AC 135 ms
30,064 KB
testcase_82 AC 133 ms
29,492 KB
testcase_83 AC 135 ms
30,356 KB
testcase_84 WA -
testcase_85 AC 134 ms
30,356 KB
testcase_86 WA -
testcase_87 AC 135 ms
29,464 KB
testcase_88 AC 137 ms
29,344 KB
testcase_89 AC 134 ms
29,548 KB
testcase_90 AC 134 ms
30,356 KB
testcase_91 AC 135 ms
30,184 KB
testcase_92 AC 136 ms
29,364 KB
testcase_93 AC 138 ms
29,304 KB
testcase_94 AC 135 ms
30,200 KB
testcase_95 WA -
testcase_96 WA -
testcase_97 AC 136 ms
30,160 KB
testcase_98 AC 134 ms
30,220 KB
testcase_99 WA -
testcase_100 AC 138 ms
29,332 KB
testcase_101 AC 135 ms
30,224 KB
testcase_102 RE -
testcase_103 RE -
testcase_104 RE -
testcase_105 RE -
testcase_106 RE -
testcase_107 RE -
testcase_108 RE -
testcase_109 RE -
testcase_110 RE -
testcase_111 RE -
testcase_112 RE -
testcase_113 RE -
testcase_114 RE -
testcase_115 RE -
testcase_116 RE -
testcase_117 RE -
testcase_118 RE -
testcase_119 RE -
testcase_120 RE -
testcase_121 RE -
testcase_122 WA -
testcase_123 WA -
testcase_124 AC 136 ms
29,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

def main():
    a = list(map(int, input().split()))
    if a == [0,0,0]:
        print(-1)
    else:
        ans = np.roots(a)
        if len(ans) == 0 or ans[0] != float(ans[0]):
            print(0)
        elif ans[0] != ans[1]:
            print(len(ans))
            for x in ans:
                print("{:.20f}".format(x))
        else:
            print(1)
            print("{:.20f}".format(ans[0]))


if __name__ == "__main__":
    main()
0