Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let input = ['5', '1', '2', '3', '4', '55']; //always string
- let print = this.print || console.log; //output -----> print() = console.log;
- let gets = this.gets || ((arr, index) => () => arr[index++])(input, 0); //read input
- const n = +gets();
- const numbersArray = [];
- for (let i = 0; i < n; i++) {
- numbersArray.push(+gets());
- }
- console.log(numbersArray);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement