結果
問題 | No.955 ax^2+bx+c=0 |
ユーザー | AEn |
提出日時 | 2022-06-15 19:54:37 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 340 bytes |
コンパイル時間 | 165 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 45,524 KB |
最終ジャッジ日時 | 2024-10-04 17:08:55 |
合計ジャッジ時間 | 61,846 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 451 ms
45,100 KB |
testcase_01 | AC | 452 ms
45,324 KB |
testcase_02 | AC | 454 ms
44,336 KB |
testcase_03 | WA | - |
testcase_04 | AC | 453 ms
44,188 KB |
testcase_05 | AC | 448 ms
44,332 KB |
testcase_06 | AC | 445 ms
43,928 KB |
testcase_07 | AC | 451 ms
44,324 KB |
testcase_08 | AC | 448 ms
44,316 KB |
testcase_09 | AC | 457 ms
44,576 KB |
testcase_10 | AC | 457 ms
44,452 KB |
testcase_11 | AC | 461 ms
44,324 KB |
testcase_12 | AC | 454 ms
44,420 KB |
testcase_13 | AC | 454 ms
44,200 KB |
testcase_14 | AC | 455 ms
44,332 KB |
testcase_15 | AC | 453 ms
44,072 KB |
testcase_16 | AC | 453 ms
44,200 KB |
testcase_17 | AC | 454 ms
44,056 KB |
testcase_18 | AC | 460 ms
43,940 KB |
testcase_19 | AC | 451 ms
43,936 KB |
testcase_20 | AC | 482 ms
43,940 KB |
testcase_21 | AC | 468 ms
44,196 KB |
testcase_22 | AC | 448 ms
44,076 KB |
testcase_23 | AC | 451 ms
44,316 KB |
testcase_24 | AC | 452 ms
44,320 KB |
testcase_25 | AC | 449 ms
44,196 KB |
testcase_26 | AC | 457 ms
44,200 KB |
testcase_27 | AC | 475 ms
44,328 KB |
testcase_28 | AC | 479 ms
44,304 KB |
testcase_29 | AC | 457 ms
44,208 KB |
testcase_30 | AC | 461 ms
44,060 KB |
testcase_31 | AC | 467 ms
43,944 KB |
testcase_32 | AC | 463 ms
44,204 KB |
testcase_33 | AC | 456 ms
43,940 KB |
testcase_34 | AC | 448 ms
44,832 KB |
testcase_35 | AC | 447 ms
45,348 KB |
testcase_36 | AC | 448 ms
45,352 KB |
testcase_37 | AC | 455 ms
45,212 KB |
testcase_38 | AC | 451 ms
44,832 KB |
testcase_39 | AC | 451 ms
45,220 KB |
testcase_40 | AC | 453 ms
44,968 KB |
testcase_41 | AC | 455 ms
44,960 KB |
testcase_42 | AC | 454 ms
44,964 KB |
testcase_43 | AC | 470 ms
45,220 KB |
testcase_44 | AC | 477 ms
45,220 KB |
testcase_45 | AC | 453 ms
45,096 KB |
testcase_46 | AC | 455 ms
45,216 KB |
testcase_47 | AC | 458 ms
45,476 KB |
testcase_48 | AC | 463 ms
44,964 KB |
testcase_49 | AC | 462 ms
45,212 KB |
testcase_50 | AC | 464 ms
45,212 KB |
testcase_51 | AC | 452 ms
45,096 KB |
testcase_52 | AC | 455 ms
44,960 KB |
testcase_53 | AC | 451 ms
44,840 KB |
testcase_54 | AC | 451 ms
44,964 KB |
testcase_55 | AC | 447 ms
45,344 KB |
testcase_56 | AC | 458 ms
45,216 KB |
testcase_57 | AC | 450 ms
45,216 KB |
testcase_58 | WA | - |
testcase_59 | WA | - |
testcase_60 | AC | 453 ms
44,324 KB |
testcase_61 | AC | 455 ms
43,804 KB |
testcase_62 | AC | 465 ms
44,960 KB |
testcase_63 | AC | 451 ms
45,348 KB |
testcase_64 | AC | 471 ms
44,072 KB |
testcase_65 | AC | 460 ms
45,092 KB |
testcase_66 | AC | 462 ms
44,308 KB |
testcase_67 | AC | 456 ms
44,712 KB |
testcase_68 | AC | 449 ms
44,324 KB |
testcase_69 | AC | 467 ms
45,056 KB |
testcase_70 | AC | 446 ms
44,688 KB |
testcase_71 | AC | 453 ms
43,940 KB |
testcase_72 | AC | 465 ms
44,316 KB |
testcase_73 | AC | 457 ms
44,844 KB |
testcase_74 | AC | 461 ms
45,088 KB |
testcase_75 | AC | 465 ms
44,064 KB |
testcase_76 | AC | 457 ms
43,936 KB |
testcase_77 | AC | 451 ms
44,840 KB |
testcase_78 | AC | 454 ms
45,216 KB |
testcase_79 | AC | 456 ms
45,216 KB |
testcase_80 | AC | 463 ms
43,932 KB |
testcase_81 | AC | 460 ms
44,708 KB |
testcase_82 | AC | 461 ms
44,452 KB |
testcase_83 | AC | 461 ms
45,100 KB |
testcase_84 | WA | - |
testcase_85 | AC | 461 ms
44,972 KB |
testcase_86 | WA | - |
testcase_87 | AC | 449 ms
44,196 KB |
testcase_88 | AC | 459 ms
44,316 KB |
testcase_89 | AC | 450 ms
44,076 KB |
testcase_90 | AC | 453 ms
45,100 KB |
testcase_91 | AC | 448 ms
44,700 KB |
testcase_92 | AC | 449 ms
44,476 KB |
testcase_93 | AC | 447 ms
44,448 KB |
testcase_94 | AC | 454 ms
45,476 KB |
testcase_95 | WA | - |
testcase_96 | WA | - |
testcase_97 | AC | 469 ms
45,424 KB |
testcase_98 | AC | 471 ms
44,944 KB |
testcase_99 | WA | - |
testcase_100 | AC | 456 ms
44,324 KB |
testcase_101 | AC | 460 ms
45,096 KB |
testcase_102 | WA | - |
testcase_103 | WA | - |
testcase_104 | WA | - |
testcase_105 | WA | - |
testcase_106 | WA | - |
testcase_107 | WA | - |
testcase_108 | WA | - |
testcase_109 | WA | - |
testcase_110 | WA | - |
testcase_111 | WA | - |
testcase_112 | WA | - |
testcase_113 | WA | - |
testcase_114 | WA | - |
testcase_115 | WA | - |
testcase_116 | WA | - |
testcase_117 | WA | - |
testcase_118 | WA | - |
testcase_119 | WA | - |
testcase_120 | WA | - |
testcase_121 | WA | - |
testcase_122 | AC | 456 ms
45,476 KB |
testcase_123 | AC | 454 ms
44,708 KB |
testcase_124 | AC | 460 ms
44,576 KB |
ソースコード
import numpy as np a,b,c = map(int, input().split()) if a == 0: if b == 0: print(0) else: print(1,c/b,sep='\n') else: if b*b-4*a*c>=0: p,q=np.roots([a,b,c]) if p>q:p,q=q,p if p!=q: print(2,p,q,sep='\n') else: print(1,p,sep='\n') else: print(0)