Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const input = ['1,2,3,3,5'];
- const gets = this.gets || ((arr, index) => () => arr[index++])(input, 0);
- const print = this.print || console.log;
- let arr = gets().split(',').map((e) => +e);
- let indexes = arr.map((e, i) => i + 1);
- let result = indexes.filter(x => !arr.includes(x)).join(',');
- print(result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement