結果

問題 No.550 夏休みの思い出(1)
ユーザー chocoruskchocorusk
提出日時 2019-09-03 13:36:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 965 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 252 ms
コンパイル使用メモリ 10,872 KB
実行使用メモリ 7,952 KB
最終ジャッジ日時 2023-08-25 14:17:58
合計ジャッジ時間 15,243 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,788 KB
testcase_01 AC 928 ms
7,784 KB
testcase_02 AC 941 ms
7,852 KB
testcase_03 AC 925 ms
7,800 KB
testcase_04 AC 941 ms
7,876 KB
testcase_05 AC 937 ms
7,816 KB
testcase_06 AC 965 ms
7,788 KB
testcase_07 AC 931 ms
7,764 KB
testcase_08 AC 939 ms
7,872 KB
testcase_09 AC 14 ms
7,872 KB
testcase_10 AC 13 ms
7,784 KB
testcase_11 AC 14 ms
7,800 KB
testcase_12 AC 13 ms
7,732 KB
testcase_13 AC 13 ms
7,804 KB
testcase_14 AC 13 ms
7,788 KB
testcase_15 AC 13 ms
7,728 KB
testcase_16 AC 13 ms
7,808 KB
testcase_17 AC 15 ms
7,908 KB
testcase_18 AC 14 ms
7,848 KB
testcase_19 AC 14 ms
7,816 KB
testcase_20 AC 14 ms
7,920 KB
testcase_21 AC 13 ms
7,916 KB
testcase_22 AC 644 ms
7,828 KB
testcase_23 AC 267 ms
7,916 KB
testcase_24 AC 363 ms
7,804 KB
testcase_25 AC 428 ms
7,844 KB
testcase_26 AC 345 ms
7,832 KB
testcase_27 AC 352 ms
7,924 KB
testcase_28 AC 326 ms
7,848 KB
testcase_29 AC 115 ms
7,812 KB
testcase_30 AC 754 ms
7,852 KB
testcase_31 AC 16 ms
7,764 KB
testcase_32 AC 17 ms
7,760 KB
testcase_33 AC 22 ms
7,780 KB
testcase_34 AC 15 ms
7,800 KB
testcase_35 AC 18 ms
7,868 KB
testcase_36 AC 17 ms
7,804 KB
testcase_37 AC 16 ms
7,916 KB
testcase_38 AC 16 ms
7,840 KB
testcase_39 AC 14 ms
7,844 KB
testcase_40 AC 92 ms
7,916 KB
testcase_41 AC 78 ms
7,752 KB
testcase_42 AC 100 ms
7,912 KB
testcase_43 AC 55 ms
7,872 KB
testcase_44 AC 69 ms
7,816 KB
testcase_45 AC 58 ms
7,804 KB
testcase_46 AC 82 ms
7,784 KB
testcase_47 AC 24 ms
7,864 KB
testcase_48 AC 15 ms
7,920 KB
testcase_49 AC 14 ms
7,872 KB
testcase_50 AC 14 ms
7,764 KB
testcase_51 AC 15 ms
7,916 KB
testcase_52 AC 57 ms
7,784 KB
testcase_53 AC 58 ms
7,772 KB
testcase_54 AC 59 ms
7,804 KB
testcase_55 AC 63 ms
7,948 KB
testcase_56 AC 62 ms
7,952 KB
testcase_57 AC 64 ms
7,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b, c=map(int, input().split())
x=0
if c!=0:
  for i in range(1, 10**6):
    if i*i*i+a*i*i+b*i+c==0:
      x=i
      break
    if -i*i*i+a*i*i-b*i+c==0:
      x=-i
      break
p=a+x
q=p*p-4*(x*x+a*x+b)
l, r=0, q
while r-l>1:
  m=(l+r)//2
  if m*m>=q:
    r=m
  else:
    l=m
ans=[x, (r-p)//2, (-r-p)//2]
ans.sort()
print(ans[0], ans[1], ans[2])
0