题解 | #杨辉三角的变形#
杨辉三角的变形
https://www.nowcoder.com/practice/8ef655edf42d4e08b44be4d777edbf43
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 while(n = await readline()){ if (n<=2) { console.log(-1) } else if (n % 4 == 0) { console.log(3) } else if (n % 4 == 1 || n % 4 == 3) { console.log(2) } else if (n % 2 == 0) { console.log(4) } } }()