結果

問題 No.550 夏休みの思い出(1)
ユーザー okadukiokaduki
提出日時 2017-07-28 23:31:27
言語 JavaScript
(node v21.7.1)
結果
WA  
実行時間 -
コード長 561 bytes
コンパイル時間 60 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 39,424 KB
最終ジャッジ日時 2024-04-21 01:50:02
合計ジャッジ時間 5,172 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 63 ms
39,296 KB
testcase_03 AC 64 ms
39,424 KB
testcase_04 AC 61 ms
39,296 KB
testcase_05 AC 62 ms
39,424 KB
testcase_06 AC 61 ms
39,424 KB
testcase_07 AC 62 ms
39,168 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 62 ms
39,168 KB
testcase_12 AC 63 ms
39,296 KB
testcase_13 AC 62 ms
39,168 KB
testcase_14 AC 62 ms
39,296 KB
testcase_15 AC 63 ms
39,424 KB
testcase_16 AC 62 ms
39,040 KB
testcase_17 AC 62 ms
39,168 KB
testcase_18 AC 61 ms
39,296 KB
testcase_19 AC 62 ms
39,168 KB
testcase_20 AC 63 ms
39,040 KB
testcase_21 AC 63 ms
39,424 KB
testcase_22 AC 63 ms
39,168 KB
testcase_23 AC 61 ms
39,040 KB
testcase_24 AC 62 ms
39,424 KB
testcase_25 AC 61 ms
39,424 KB
testcase_26 AC 63 ms
39,168 KB
testcase_27 AC 62 ms
39,296 KB
testcase_28 AC 60 ms
39,296 KB
testcase_29 AC 61 ms
39,424 KB
testcase_30 AC 61 ms
39,168 KB
testcase_31 AC 61 ms
39,424 KB
testcase_32 AC 62 ms
39,168 KB
testcase_33 AC 65 ms
39,168 KB
testcase_34 AC 65 ms
39,424 KB
testcase_35 AC 63 ms
39,040 KB
testcase_36 AC 62 ms
39,296 KB
testcase_37 AC 61 ms
39,168 KB
testcase_38 AC 62 ms
39,168 KB
testcase_39 AC 62 ms
39,424 KB
testcase_40 AC 65 ms
39,168 KB
testcase_41 AC 61 ms
39,296 KB
testcase_42 AC 62 ms
39,168 KB
testcase_43 AC 62 ms
39,168 KB
testcase_44 AC 63 ms
39,296 KB
testcase_45 AC 63 ms
39,424 KB
testcase_46 AC 66 ms
39,424 KB
testcase_47 AC 63 ms
39,168 KB
testcase_48 AC 64 ms
39,168 KB
testcase_49 AC 64 ms
39,168 KB
testcase_50 AC 62 ms
39,168 KB
testcase_51 AC 61 ms
39,168 KB
testcase_52 AC 64 ms
39,040 KB
testcase_53 AC 64 ms
39,168 KB
testcase_54 AC 64 ms
39,168 KB
testcase_55 AC 63 ms
39,296 KB
testcase_56 AC 62 ms
39,424 KB
testcase_57 AC 62 ms
39,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

function Main(input) {
  var data = input.split(" ")
  var a = parseInt(data[0]);
  var b = parseInt(data[1]);
  var c = parseInt(data[2]);
  var f = x => x*x*x + a*x*x + b*x + c;
  var df = x => 3*x*x + 2*a*x + b;

  x0 = -1000000000;
  for(var i=0;i<100;++i)
	x0 -= f(x0) / df(x0);
  x2 = 1000000000;
  for(var i=0;i<100;++i)
	x2 -= f(x2) / df(x2);
  x1 = (x0 + x2) / 2;
  for(var i=0;i<100;++i)
	x1 -= f(x1) / df(x1);
  
  console.log(Math.round(x0) + ' ' + Math.round(x1) + ' ' + Math.round(x2));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
0