const { Transform } = require('stream'); const sqrt = new Transform({     transform(chunk, encoding, callback) {         this.push(Math.sqrt(chunk).toFixed(4));         callback();     }, }); process.stdin.pipe(sqrt).pipe(process.stdout);
点赞 评论

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务