結果
問題 | No.955 ax^2+bx+c=0 |
ユーザー | koyopro |
提出日時 | 2020-01-25 13:35:08 |
言語 | PyPy2 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 675 bytes |
コンパイル時間 | 1,314 ms |
コンパイル使用メモリ | 76,672 KB |
実行使用メモリ | 88,320 KB |
最終ジャッジ日時 | 2024-09-14 04:05:01 |
合計ジャッジ時間 | 23,297 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 147 ms
87,816 KB |
testcase_01 | AC | 148 ms
87,928 KB |
testcase_02 | AC | 146 ms
87,944 KB |
testcase_03 | AC | 146 ms
87,808 KB |
testcase_04 | AC | 146 ms
87,988 KB |
testcase_05 | AC | 146 ms
87,828 KB |
testcase_06 | AC | 149 ms
88,064 KB |
testcase_07 | AC | 148 ms
88,192 KB |
testcase_08 | AC | 147 ms
88,072 KB |
testcase_09 | AC | 146 ms
87,696 KB |
testcase_10 | AC | 148 ms
87,936 KB |
testcase_11 | AC | 147 ms
87,868 KB |
testcase_12 | AC | 146 ms
88,080 KB |
testcase_13 | AC | 148 ms
87,864 KB |
testcase_14 | AC | 145 ms
87,848 KB |
testcase_15 | AC | 147 ms
87,948 KB |
testcase_16 | AC | 150 ms
87,952 KB |
testcase_17 | AC | 147 ms
87,976 KB |
testcase_18 | AC | 149 ms
87,716 KB |
testcase_19 | AC | 149 ms
88,192 KB |
testcase_20 | AC | 148 ms
87,936 KB |
testcase_21 | AC | 149 ms
87,828 KB |
testcase_22 | AC | 148 ms
88,128 KB |
testcase_23 | AC | 145 ms
88,192 KB |
testcase_24 | AC | 146 ms
87,816 KB |
testcase_25 | AC | 147 ms
87,944 KB |
testcase_26 | AC | 148 ms
88,252 KB |
testcase_27 | AC | 149 ms
87,712 KB |
testcase_28 | AC | 147 ms
88,112 KB |
testcase_29 | AC | 149 ms
88,064 KB |
testcase_30 | AC | 153 ms
87,936 KB |
testcase_31 | AC | 149 ms
87,936 KB |
testcase_32 | AC | 149 ms
87,808 KB |
testcase_33 | AC | 145 ms
87,804 KB |
testcase_34 | AC | 149 ms
88,064 KB |
testcase_35 | AC | 146 ms
88,176 KB |
testcase_36 | AC | 149 ms
88,060 KB |
testcase_37 | AC | 151 ms
88,092 KB |
testcase_38 | AC | 148 ms
88,064 KB |
testcase_39 | AC | 148 ms
87,964 KB |
testcase_40 | AC | 149 ms
87,740 KB |
testcase_41 | AC | 148 ms
87,936 KB |
testcase_42 | AC | 146 ms
87,808 KB |
testcase_43 | AC | 149 ms
87,936 KB |
testcase_44 | AC | 148 ms
87,840 KB |
testcase_45 | AC | 148 ms
88,076 KB |
testcase_46 | WA | - |
testcase_47 | WA | - |
testcase_48 | WA | - |
testcase_49 | WA | - |
testcase_50 | WA | - |
testcase_51 | WA | - |
testcase_52 | WA | - |
testcase_53 | WA | - |
testcase_54 | WA | - |
testcase_55 | WA | - |
testcase_56 | WA | - |
testcase_57 | WA | - |
testcase_58 | AC | 147 ms
87,704 KB |
testcase_59 | WA | - |
testcase_60 | AC | 148 ms
87,968 KB |
testcase_61 | AC | 145 ms
87,808 KB |
testcase_62 | AC | 148 ms
87,944 KB |
testcase_63 | WA | - |
testcase_64 | AC | 150 ms
87,852 KB |
testcase_65 | WA | - |
testcase_66 | AC | 149 ms
88,064 KB |
testcase_67 | AC | 148 ms
87,936 KB |
testcase_68 | AC | 149 ms
88,064 KB |
testcase_69 | AC | 150 ms
87,928 KB |
testcase_70 | WA | - |
testcase_71 | AC | 152 ms
87,960 KB |
testcase_72 | AC | 148 ms
87,948 KB |
testcase_73 | AC | 148 ms
87,808 KB |
testcase_74 | AC | 149 ms
88,320 KB |
testcase_75 | AC | 150 ms
88,064 KB |
testcase_76 | AC | 146 ms
87,936 KB |
testcase_77 | WA | - |
testcase_78 | WA | - |
testcase_79 | WA | - |
testcase_80 | AC | 148 ms
87,828 KB |
testcase_81 | AC | 148 ms
87,952 KB |
testcase_82 | AC | 146 ms
87,812 KB |
testcase_83 | AC | 146 ms
87,832 KB |
testcase_84 | AC | 147 ms
87,968 KB |
testcase_85 | AC | 147 ms
88,084 KB |
testcase_86 | AC | 149 ms
87,936 KB |
testcase_87 | AC | 146 ms
87,720 KB |
testcase_88 | AC | 149 ms
87,936 KB |
testcase_89 | AC | 146 ms
87,936 KB |
testcase_90 | AC | 146 ms
88,060 KB |
testcase_91 | AC | 148 ms
88,064 KB |
testcase_92 | AC | 149 ms
87,860 KB |
testcase_93 | AC | 150 ms
88,096 KB |
testcase_94 | AC | 150 ms
87,820 KB |
testcase_95 | AC | 175 ms
88,072 KB |
testcase_96 | AC | 150 ms
87,968 KB |
testcase_97 | AC | 147 ms
87,936 KB |
testcase_98 | AC | 148 ms
87,936 KB |
testcase_99 | AC | 146 ms
87,848 KB |
testcase_100 | AC | 147 ms
87,936 KB |
testcase_101 | AC | 149 ms
88,064 KB |
testcase_102 | AC | 149 ms
88,096 KB |
testcase_103 | AC | 148 ms
88,312 KB |
testcase_104 | AC | 148 ms
88,312 KB |
testcase_105 | AC | 149 ms
88,096 KB |
testcase_106 | AC | 148 ms
88,060 KB |
testcase_107 | AC | 146 ms
88,192 KB |
testcase_108 | AC | 148 ms
87,968 KB |
testcase_109 | AC | 150 ms
87,732 KB |
testcase_110 | AC | 146 ms
88,084 KB |
testcase_111 | AC | 147 ms
87,936 KB |
testcase_112 | AC | 147 ms
87,948 KB |
testcase_113 | AC | 147 ms
87,676 KB |
testcase_114 | AC | 147 ms
87,972 KB |
testcase_115 | AC | 147 ms
88,064 KB |
testcase_116 | AC | 150 ms
87,692 KB |
testcase_117 | AC | 149 ms
87,972 KB |
testcase_118 | AC | 149 ms
87,936 KB |
testcase_119 | AC | 147 ms
87,936 KB |
testcase_120 | AC | 148 ms
88,192 KB |
testcase_121 | AC | 149 ms
87,808 KB |
testcase_122 | AC | 168 ms
87,936 KB |
testcase_123 | AC | 165 ms
87,968 KB |
testcase_124 | WA | - |
ソースコード
from decimal import * a,b,c = [Decimal(int(x)) for x in raw_input().split()] def solve(): if (a==0 and b==0): print(-1 if (c==0) else 0) return if (a==0): print(1) ans = -c/b print("{:.16f}".format(ans)) return border = Decimal(b*b - 4 * a * c) if (border < 0): print(0) return if (border == 0): print(1) ans = -b / Decimal(2) / a print("{:.16f}".format(ans)) return q = border.sqrt() ans0 = (-b + q) / Decimal(2) / a ans1 = (-b - q) / Decimal(2) / a print(2) print("{:.16f}".format(ans1)) print("{:.16f}".format(ans0)) solve()