题解 | #百钱买百鸡问题#
百钱买百鸡问题
https://www.nowcoder.com/practice/74c493f094304ea2bda37d0dc40dc85b
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 ((line = await readline())) { for (let x = 0; x < 20; x++) { for (let y = 0; y < 33; y++) { if (5 * x + 3 * y + (100 - x - y) / 3 === 100) console.log(x, y, 100 - x - y); } } } })();