一元二次方程
const rl = require("readline").createInterface({ input: process.stdin }); var iter = rl[Symbol.asyncIterator](); const readline = async () => (await iter.next()).value; void async function () { // Write your code here let h = await readline() // 由题意得: x*x + x - h < 0 let x1,x2 ,delta; delta = 1+ 4 * h; x1 = (-1 - Math.sqrt(delta))/2 x2 = (-1 + Math.sqrt(delta))/2 console.log(Math.floor(x2)) }()