結果

問題 No.955 ax^2+bx+c=0
ユーザー 👑 emthrmemthrm
提出日時 2019-12-18 03:24:10
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 432 bytes
コンパイル時間 582 ms
コンパイル使用メモリ 86,944 KB
実行使用メモリ 79,468 KB
最終ジャッジ日時 2023-09-21 05:56:02
合計ジャッジ時間 15,473 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,796 KB
testcase_01 AC 75 ms
71,416 KB
testcase_02 AC 73 ms
71,364 KB
testcase_03 AC 71 ms
71,068 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 72 ms
71,252 KB
testcase_15 AC 72 ms
71,352 KB
testcase_16 AC 72 ms
71,032 KB
testcase_17 AC 74 ms
71,332 KB
testcase_18 AC 72 ms
71,208 KB
testcase_19 AC 72 ms
71,120 KB
testcase_20 AC 73 ms
71,220 KB
testcase_21 AC 73 ms
71,088 KB
testcase_22 AC 71 ms
70,900 KB
testcase_23 AC 75 ms
71,340 KB
testcase_24 AC 75 ms
70,900 KB
testcase_25 AC 73 ms
71,232 KB
testcase_26 AC 73 ms
71,196 KB
testcase_27 AC 71 ms
71,360 KB
testcase_28 AC 73 ms
71,212 KB
testcase_29 AC 73 ms
71,288 KB
testcase_30 AC 73 ms
71,320 KB
testcase_31 AC 73 ms
71,348 KB
testcase_32 AC 72 ms
71,216 KB
testcase_33 AC 74 ms
71,188 KB
testcase_34 RE -
testcase_35 RE -
testcase_36 RE -
testcase_37 RE -
testcase_38 RE -
testcase_39 RE -
testcase_40 RE -
testcase_41 RE -
testcase_42 RE -
testcase_43 RE -
testcase_44 RE -
testcase_45 RE -
testcase_46 RE -
testcase_47 RE -
testcase_48 RE -
testcase_49 RE -
testcase_50 RE -
testcase_51 RE -
testcase_52 RE -
testcase_53 RE -
testcase_54 RE -
testcase_55 RE -
testcase_56 RE -
testcase_57 RE -
testcase_58 AC 73 ms
71,232 KB
testcase_59 AC 73 ms
71,908 KB
testcase_60 AC 73 ms
71,220 KB
testcase_61 AC 73 ms
71,048 KB
testcase_62 AC 71 ms
71,744 KB
testcase_63 AC 71 ms
71,604 KB
testcase_64 AC 71 ms
71,080 KB
testcase_65 AC 71 ms
71,620 KB
testcase_66 AC 72 ms
71,228 KB
testcase_67 AC 72 ms
71,728 KB
testcase_68 AC 73 ms
71,424 KB
testcase_69 AC 72 ms
71,316 KB
testcase_70 AC 72 ms
71,696 KB
testcase_71 AC 72 ms
71,116 KB
testcase_72 AC 71 ms
71,048 KB
testcase_73 AC 72 ms
71,492 KB
testcase_74 AC 71 ms
71,440 KB
testcase_75 AC 71 ms
71,284 KB
testcase_76 AC 72 ms
71,112 KB
testcase_77 AC 72 ms
71,736 KB
testcase_78 AC 71 ms
71,496 KB
testcase_79 AC 72 ms
71,732 KB
testcase_80 AC 73 ms
71,092 KB
testcase_81 AC 73 ms
71,780 KB
testcase_82 AC 72 ms
71,236 KB
testcase_83 AC 72 ms
71,372 KB
testcase_84 AC 72 ms
71,252 KB
testcase_85 AC 72 ms
71,040 KB
testcase_86 AC 72 ms
71,328 KB
testcase_87 AC 71 ms
71,296 KB
testcase_88 AC 71 ms
71,276 KB
testcase_89 AC 70 ms
71,164 KB
testcase_90 AC 71 ms
71,172 KB
testcase_91 AC 73 ms
71,116 KB
testcase_92 WA -
testcase_93 WA -
testcase_94 AC 72 ms
71,356 KB
testcase_95 AC 72 ms
71,116 KB
testcase_96 AC 72 ms
71,484 KB
testcase_97 AC 72 ms
71,228 KB
testcase_98 AC 71 ms
71,044 KB
testcase_99 AC 71 ms
71,248 KB
testcase_100 WA -
testcase_101 AC 73 ms
70,904 KB
testcase_102 AC 73 ms
71,252 KB
testcase_103 AC 72 ms
70,944 KB
testcase_104 AC 71 ms
71,252 KB
testcase_105 AC 72 ms
70,936 KB
testcase_106 AC 71 ms
71,084 KB
testcase_107 AC 71 ms
71,376 KB
testcase_108 AC 72 ms
71,084 KB
testcase_109 AC 73 ms
71,240 KB
testcase_110 AC 73 ms
71,116 KB
testcase_111 AC 72 ms
71,296 KB
testcase_112 AC 72 ms
71,384 KB
testcase_113 AC 73 ms
71,252 KB
testcase_114 AC 71 ms
71,220 KB
testcase_115 AC 72 ms
71,244 KB
testcase_116 AC 73 ms
71,520 KB
testcase_117 AC 72 ms
71,472 KB
testcase_118 AC 73 ms
71,288 KB
testcase_119 AC 71 ms
71,340 KB
testcase_120 AC 73 ms
71,348 KB
testcase_121 AC 72 ms
71,540 KB
testcase_122 RE -
testcase_123 RE -
testcase_124 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b, c = [int(i) for i in input().split()]
if a == 0:
    if b == 0:
        print(-1)
    else:
        print(1)
        print(-c / b)
else:
    d = b * b - a * c * 4
    if d == 0:
        print(1)
        print(-b / (2 * a))
    elif d > 0:
        print(2)
        d **= 0.5
        ans1 = 2 * c / (-b + d)
        ans2 = 2 * c / (-b - d)
        print(min(ans1, ans2))
        print(max(ans1, ans2))
    else:
        print(0)
0