結果
| 問題 |
No.750 Frac #1
|
| コンテスト | |
| ユーザー |
yasunori_es
|
| 提出日時 | 2018-12-04 15:24:58 |
| 言語 | JavaScript (node v23.5.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 417 bytes |
| コンパイル時間 | 47 ms |
| コンパイル使用メモリ | 6,688 KB |
| 実行使用メモリ | 41,580 KB |
| 最終ジャッジ日時 | 2024-10-13 00:56:31 |
| 合計ジャッジ時間 | 2,754 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 30 |
ソースコード
let stdin=require("fs").readFileSync("/dev/stdin","utf-8");
let rows=stdin.split("\n").slice(1);
let i=0;
let numbers=[];
while(i<number){
let col=rows[i].split(" ");
numbers.push({});
numbers[i].id=i;
numbers[i].num=Number(col[0])/Number(col[1]);
i++;
}
numbers.sort((a,b)=>{
if(a.num>b.num) return -1;
if(a.num<b.num) return 1;
});
numbers.forEach((e)=>{
console.log(rows[e.id]);
});
yasunori_es