結果

問題 No.306 さいたま2008
ユーザー 💕💖💞💕💖💞
提出日時 2016-09-11 22:24:26
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 614 bytes
コンパイル時間 35 ms
コンパイル使用メモリ 6,812 KB
実行使用メモリ 41,088 KB
最終ジャッジ日時 2024-04-21 01:24:37
合計ジャッジ時間 2,763 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
41,088 KB
testcase_01 AC 78 ms
40,704 KB
testcase_02 AC 75 ms
40,576 KB
testcase_03 AC 73 ms
40,832 KB
testcase_04 AC 71 ms
40,448 KB
testcase_05 AC 71 ms
40,960 KB
testcase_06 AC 70 ms
40,448 KB
testcase_07 AC 71 ms
40,448 KB
testcase_08 AC 70 ms
40,448 KB
testcase_09 AC 72 ms
40,960 KB
testcase_10 AC 70 ms
40,448 KB
testcase_11 AC 71 ms
40,832 KB
testcase_12 AC 73 ms
40,960 KB
testcase_13 AC 71 ms
40,448 KB
testcase_14 AC 72 ms
40,576 KB
testcase_15 AC 75 ms
40,576 KB
testcase_16 AC 72 ms
40,448 KB
testcase_17 AC 71 ms
40,960 KB
testcase_18 AC 71 ms
40,576 KB
testcase_19 AC 71 ms
40,960 KB
testcase_20 AC 71 ms
40,576 KB
testcase_21 AC 72 ms
40,448 KB
testcase_22 AC 72 ms
40,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

var lines = [];
var counter = 0;
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', function (line) {
  counter += 1;
  lines.push(line);
  if( counter == 2 ) { 
    main();
    process.exit(0);
  }
});
process.stdin.on('end', function () {
  //do something
});

function main(){
  ents = [];
  lines.map(function(x){
    x.split(" ").map(function(x2){
      ents.push(parseFloat(x2));
    });
  });
  var ax = ents[0];
  var ay = ents[1];
  var bx = ents[2];
  var by = ents[3];
  var k  = (by - ay)/( bx + ax );
  console.log(ay + k * ax);
}
0