Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const input = [
- '1,1,1,1,1,1,1,1'
- ];
- let print = this.print || console.log;
- let gets = this.gets || ((arr, index) => () => arr[index++])(input, 0);
- let arrInput = gets().split(',').map(Number);
- let notPresent = [];
- let len = arrInput.length;
- for (let i = 1; i < arrInput.length + 1; i++) {
- if (!arrInput.includes(i)) {
- notPresent.push(i);
- }
- }
- print(notPresent.join(','));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement