結果
問題 | No.955 ax^2+bx+c=0 |
ユーザー | googol_S0 |
提出日時 | 2021-01-03 19:57:48 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 693 bytes |
コンパイル時間 | 319 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 45,532 KB |
最終ジャッジ日時 | 2024-10-13 14:07:16 |
合計ジャッジ時間 | 61,368 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 461 ms
44,760 KB |
testcase_01 | AC | 470 ms
44,756 KB |
testcase_02 | AC | 467 ms
44,884 KB |
testcase_03 | AC | 462 ms
44,500 KB |
testcase_04 | AC | 453 ms
43,868 KB |
testcase_05 | AC | 452 ms
44,112 KB |
testcase_06 | AC | 457 ms
44,500 KB |
testcase_07 | AC | 451 ms
43,868 KB |
testcase_08 | AC | 453 ms
43,992 KB |
testcase_09 | AC | 446 ms
44,112 KB |
testcase_10 | AC | 457 ms
44,120 KB |
testcase_11 | AC | 454 ms
44,252 KB |
testcase_12 | AC | 470 ms
44,244 KB |
testcase_13 | AC | 464 ms
44,088 KB |
testcase_14 | AC | 472 ms
44,256 KB |
testcase_15 | AC | 453 ms
44,500 KB |
testcase_16 | AC | 470 ms
44,252 KB |
testcase_17 | AC | 463 ms
44,124 KB |
testcase_18 | AC | 457 ms
43,992 KB |
testcase_19 | AC | 450 ms
44,448 KB |
testcase_20 | AC | 451 ms
43,856 KB |
testcase_21 | AC | 455 ms
44,372 KB |
testcase_22 | AC | 458 ms
44,120 KB |
testcase_23 | AC | 466 ms
43,868 KB |
testcase_24 | AC | 452 ms
44,120 KB |
testcase_25 | AC | 463 ms
44,112 KB |
testcase_26 | AC | 454 ms
43,892 KB |
testcase_27 | AC | 462 ms
44,244 KB |
testcase_28 | AC | 459 ms
44,124 KB |
testcase_29 | AC | 463 ms
44,124 KB |
testcase_30 | AC | 454 ms
44,112 KB |
testcase_31 | AC | 470 ms
43,864 KB |
testcase_32 | AC | 450 ms
43,988 KB |
testcase_33 | AC | 464 ms
44,120 KB |
testcase_34 | AC | 457 ms
44,892 KB |
testcase_35 | AC | 467 ms
45,144 KB |
testcase_36 | AC | 462 ms
44,624 KB |
testcase_37 | AC | 468 ms
44,888 KB |
testcase_38 | AC | 465 ms
45,012 KB |
testcase_39 | AC | 464 ms
44,880 KB |
testcase_40 | AC | 464 ms
44,768 KB |
testcase_41 | AC | 464 ms
44,628 KB |
testcase_42 | AC | 461 ms
44,760 KB |
testcase_43 | AC | 467 ms
44,892 KB |
testcase_44 | AC | 457 ms
45,148 KB |
testcase_45 | AC | 460 ms
45,280 KB |
testcase_46 | AC | 455 ms
44,764 KB |
testcase_47 | AC | 450 ms
45,020 KB |
testcase_48 | AC | 464 ms
45,012 KB |
testcase_49 | AC | 454 ms
45,268 KB |
testcase_50 | AC | 459 ms
45,012 KB |
testcase_51 | AC | 456 ms
45,140 KB |
testcase_52 | AC | 470 ms
44,760 KB |
testcase_53 | AC | 465 ms
44,756 KB |
testcase_54 | AC | 480 ms
45,140 KB |
testcase_55 | AC | 468 ms
45,148 KB |
testcase_56 | AC | 461 ms
44,760 KB |
testcase_57 | AC | 451 ms
45,132 KB |
testcase_58 | WA | - |
testcase_59 | WA | - |
testcase_60 | WA | - |
testcase_61 | WA | - |
testcase_62 | AC | 456 ms
45,268 KB |
testcase_63 | AC | 472 ms
44,880 KB |
testcase_64 | AC | 465 ms
45,148 KB |
testcase_65 | AC | 475 ms
44,756 KB |
testcase_66 | AC | 469 ms
45,016 KB |
testcase_67 | AC | 462 ms
44,884 KB |
testcase_68 | AC | 456 ms
44,756 KB |
testcase_69 | AC | 465 ms
44,884 KB |
testcase_70 | AC | 461 ms
45,016 KB |
testcase_71 | AC | 456 ms
45,140 KB |
testcase_72 | AC | 457 ms
45,268 KB |
testcase_73 | AC | 463 ms
44,880 KB |
testcase_74 | AC | 552 ms
44,892 KB |
testcase_75 | AC | 464 ms
44,760 KB |
testcase_76 | AC | 459 ms
44,840 KB |
testcase_77 | AC | 457 ms
44,636 KB |
testcase_78 | AC | 462 ms
45,264 KB |
testcase_79 | AC | 464 ms
45,148 KB |
testcase_80 | AC | 462 ms
44,756 KB |
testcase_81 | AC | 467 ms
45,024 KB |
testcase_82 | AC | 452 ms
44,504 KB |
testcase_83 | AC | 460 ms
44,760 KB |
testcase_84 | WA | - |
testcase_85 | AC | 468 ms
45,144 KB |
testcase_86 | WA | - |
testcase_87 | AC | 465 ms
44,432 KB |
testcase_88 | AC | 461 ms
44,120 KB |
testcase_89 | AC | 461 ms
43,868 KB |
testcase_90 | AC | 457 ms
45,148 KB |
testcase_91 | AC | 463 ms
44,760 KB |
testcase_92 | AC | 466 ms
44,244 KB |
testcase_93 | AC | 452 ms
44,372 KB |
testcase_94 | AC | 451 ms
44,628 KB |
testcase_95 | AC | 456 ms
45,268 KB |
testcase_96 | AC | 455 ms
45,016 KB |
testcase_97 | AC | 446 ms
45,264 KB |
testcase_98 | AC | 450 ms
44,756 KB |
testcase_99 | AC | 458 ms
45,140 KB |
testcase_100 | AC | 458 ms
43,996 KB |
testcase_101 | AC | 458 ms
44,884 KB |
testcase_102 | AC | 460 ms
45,004 KB |
testcase_103 | AC | 460 ms
44,884 KB |
testcase_104 | AC | 451 ms
44,368 KB |
testcase_105 | AC | 452 ms
44,512 KB |
testcase_106 | AC | 453 ms
44,628 KB |
testcase_107 | AC | 460 ms
45,008 KB |
testcase_108 | AC | 460 ms
44,892 KB |
testcase_109 | AC | 453 ms
44,888 KB |
testcase_110 | AC | 453 ms
44,764 KB |
testcase_111 | AC | 460 ms
44,764 KB |
testcase_112 | AC | 461 ms
44,752 KB |
testcase_113 | AC | 449 ms
44,372 KB |
testcase_114 | AC | 456 ms
44,760 KB |
testcase_115 | AC | 461 ms
44,628 KB |
testcase_116 | AC | 446 ms
44,508 KB |
testcase_117 | AC | 454 ms
44,756 KB |
testcase_118 | AC | 462 ms
44,888 KB |
testcase_119 | AC | 457 ms
44,756 KB |
testcase_120 | AC | 463 ms
44,764 KB |
testcase_121 | AC | 473 ms
44,756 KB |
testcase_122 | AC | 461 ms
44,764 KB |
testcase_123 | AC | 555 ms
44,760 KB |
testcase_124 | AC | 456 ms
44,748 KB |
ソースコード
import numpy as np EPS=1e-8 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 str(type(x[i]))!="<class 'numpy.float64'>": if abs(x[i].imag)>EPS: del x[i] else: x[i]=x[i].real x=sorted(set(x)) print(len(x)) if len(x): print(*x,sep='\n') else: x=sorted(set(np.roots([a,b,c]))) for i in range(len(x)-1,-1,-1): if str(type(x[i]))!="<class 'numpy.float64'>": if abs(x[i].imag)>EPS: del x[i] else: x[i]=x[i].real x=sorted(set(x)) print(len(x)) if len(x): print(*x,sep='\n')