Skip to content

Instantly share code, notes, and snippets.

@valsaven
Last active December 12, 2016 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valsaven/c57a467fdaa7e9ebcbda4068cc539b08 to your computer and use it in GitHub Desktop.
Save valsaven/c57a467fdaa7e9ebcbda4068cc539b08 to your computer and use it in GitHub Desktop.
Hackerrank JavaScript Input
let _input = "";
process.stdin.resume();
process.stdin.setEncoding("ascii");
process.stdin.on("data", (input) => _input += input);
process.stdin.on("end", () => processData(_input));
function processData(input) {
// Array with input values
const stdin = input.split("\n");
/*
Your code
*/
return console.log(/* result */);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment