Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const input = ['135', '357', '791', '357', '913', '579', '135'];
- const print = this.print || console.log;
- const gets = this.gets || ((arr, index) => () => arr[index++])(input, 0);
- print(Array.from({ length: 7 }, () => gets()).filter(([a, b, c]) => ((+a + +b + +c) % 10) < Math.max(Math.abs(a - b), Math.abs(a - c), Math.abs(b - c))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement