結果

問題 No.750 Frac #1
ユーザー TksiTksi
提出日時 2018-11-20 17:13:16
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 80 ms / 1,000 ms
コード長 318 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 7,156 KB
実行使用メモリ 44,308 KB
最終ジャッジ日時 2023-08-03 02:57:13
合計ジャッジ時間 4,711 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
42,256 KB
testcase_01 AC 76 ms
42,424 KB
testcase_02 AC 77 ms
42,240 KB
testcase_03 AC 76 ms
42,368 KB
testcase_04 AC 80 ms
42,448 KB
testcase_05 AC 76 ms
42,268 KB
testcase_06 AC 77 ms
42,272 KB
testcase_07 AC 75 ms
42,392 KB
testcase_08 AC 76 ms
42,260 KB
testcase_09 AC 75 ms
42,252 KB
testcase_10 AC 76 ms
42,356 KB
testcase_11 AC 76 ms
42,244 KB
testcase_12 AC 76 ms
42,240 KB
testcase_13 AC 77 ms
42,276 KB
testcase_14 AC 77 ms
44,308 KB
testcase_15 AC 77 ms
42,272 KB
testcase_16 AC 77 ms
42,384 KB
testcase_17 AC 76 ms
42,244 KB
testcase_18 AC 76 ms
42,244 KB
testcase_19 AC 76 ms
42,268 KB
testcase_20 AC 75 ms
42,240 KB
testcase_21 AC 75 ms
42,236 KB
testcase_22 AC 75 ms
42,264 KB
testcase_23 AC 74 ms
42,384 KB
testcase_24 AC 74 ms
42,364 KB
testcase_25 AC 75 ms
42,456 KB
testcase_26 AC 75 ms
42,284 KB
testcase_27 AC 75 ms
42,448 KB
testcase_28 AC 74 ms
42,432 KB
testcase_29 AC 76 ms
42,340 KB
testcase_30 AC 75 ms
42,256 KB
testcase_31 AC 75 ms
42,252 KB
testcase_32 AC 75 ms
42,420 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

let input = require('fs').readFileSync('/dev/stdin', 'utf8');
input = input.split('\n')
input.shift();
input.pop();
let AB = input
  .map(v => v
    .split(/\s/)
    .map(v => Number(v)))
  .map(v => [v[0], v[1], v[0] / v[1]])
  .sort((a, b) => b[2] - a[2]);
console.log(AB
  .map(v => `${v[0]} ${v[1]}`)
  .join`\n`);
0