Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve (input) {
- let substractor = Number(input.shift())
- input.pop()
- let regex = /@([A-Za-z]+)[^@\-!:>]*!G!/
- for (let param of input) {
- let currentLine = param
- .split('')
- .map(x => x.charCodeAt(0))
- .map(x => x - substractor)
- .map(x => String.fromCharCode(x))
- .join('')
- let match = currentLine.match(regex)
- if (match) {
- console.log(match[1])
- }
- }
- }
Add Comment
Please, Sign In to add comment