OPS - その 2 (paizaランク C 相当)
解答例
const fs = require("fs");
const input = fs.readFileSync("/dev/stdin", "utf-8").trim();
const lines = input.split("\n");
const n = Number(lines[0]);
//OPS 「出塁率と長打率を足し合わせた値」
const OPS = lines.slice(1).map(line => line.split(" ").map(Number).reduce((a, b) => a + b));
//最も高いOPS
const max = OPS.reduce((a, b) => Math.max(a, b));
//同率トップがいた場合は番号の早い方を出力
console.log(OPS.indexOf(max) + 1);