Guest User

Untitled

a guest
May 17th, 2021
49
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let input = ['5', '1', '2', '3', '4', '55']; //always string
  2.  
  3. let print = this.print || console.log; //output -----> print() = console.log;
  4. let gets = this.gets || ((arr, index) => () => arr[index++])(input, 0); //read input
  5.  
  6. const n = +gets();
  7.  
  8. const numbersArray = [];
  9.  
  10. for (let i = 0; i < n; i++) {
  11.     numbersArray.push(+gets());
  12. }
  13.  
  14. console.log(numbersArray);
  15.  
RAW Paste Data