結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 67 ms
40,064 KB
testcase_03 AC 66 ms
40,576 KB
testcase_04 AC 67 ms
40,192 KB
testcase_05 AC 66 ms
40,192 KB
testcase_06 AC 66 ms
40,192 KB
testcase_07 AC 66 ms
40,192 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 66 ms
40,192 KB
testcase_12 AC 68 ms
40,448 KB
testcase_13 AC 68 ms
40,320 KB
testcase_14 AC 69 ms
40,576 KB
testcase_15 AC 68 ms
40,192 KB
testcase_16 AC 67 ms
40,448 KB
testcase_17 AC 66 ms
40,192 KB
testcase_18 AC 67 ms
40,320 KB
testcase_19 AC 67 ms
40,320 KB
testcase_20 AC 66 ms
40,192 KB
testcase_21 AC 66 ms
40,192 KB
testcase_22 AC 66 ms
40,192 KB
testcase_23 AC 67 ms
40,192 KB
testcase_24 AC 66 ms
40,320 KB
testcase_25 AC 67 ms
40,320 KB
testcase_26 AC 67 ms
40,192 KB
testcase_27 AC 67 ms
40,192 KB
testcase_28 AC 68 ms
40,192 KB
testcase_29 AC 66 ms
40,576 KB
testcase_30 AC 67 ms
40,192 KB
testcase_31 AC 67 ms
40,192 KB
testcase_32 AC 67 ms
40,192 KB
testcase_33 AC 66 ms
40,192 KB
testcase_34 AC 67 ms
40,064 KB
testcase_35 AC 66 ms
40,192 KB
testcase_36 AC 67 ms
40,448 KB
testcase_37 AC 68 ms
40,192 KB
testcase_38 AC 67 ms
40,192 KB
testcase_39 AC 66 ms
40,192 KB
testcase_40 AC 67 ms
40,192 KB
testcase_41 AC 66 ms
40,320 KB
testcase_42 AC 66 ms
40,448 KB
testcase_43 AC 67 ms
40,320 KB
testcase_44 AC 67 ms
40,576 KB
testcase_45 AC 67 ms
40,192 KB
testcase_46 AC 66 ms
40,320 KB
testcase_47 AC 66 ms
40,448 KB
testcase_48 AC 69 ms
40,192 KB
testcase_49 AC 68 ms
40,576 KB
testcase_50 AC 67 ms
40,320 KB
testcase_51 AC 66 ms
40,192 KB
testcase_52 AC 66 ms
40,192 KB
testcase_53 AC 65 ms
40,320 KB
testcase_54 AC 69 ms
40,320 KB
testcase_55 AC 68 ms
40,320 KB
testcase_56 AC 66 ms
40,192 KB
testcase_57 AC 66 ms
40,192 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<1000;++i)
	x0 -= f(x0) / df(x0);
  x2 = 1000000000;
  for(var i=0;i<1000;++i)
	x2 -= f(x2) / df(x2);
  x1 = -a / 3.0;
  
  for(var i=0;i<1000;++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