Sample code to perform I/O
Thu Apr 28 2022 23:58:36 GMT+0000 (Coordinated Universal Time)
Saved by
@GreenMark
// Sample code to perform I/O:
process.stdin.resume();
process.stdin.setEncoding("utf-8");
var stdin_input = "";
process.stdin.on("data", function (input) {
stdin_input += input;
// Reading input from STDIN
});
process.stdin.on("end", function () {
main(stdin_input);
});
function main(input) {
var data = input.split('\n');
var num = parseInt(data[0],10);
var str = data[1];
myFunction(num,str)
// Writing output to STDOUT
}
// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
// Write your code here
function myFunction(num, str) {
return process.stdout.write(num *2 + "\n" + str);
}
content_copyCOPY
Comments