Skip to content

Instantly share code, notes, and snippets.

Created October 28, 2020 12:11
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
const S = readline();
// Write an answer using console.log()
// To debug: console.error('Debug messages...');
//console.error(.map(a => a.length - 2));
const matches = S.replace(/\\\\/g, '#').replace(/\\"/g, '#').match(/\"[^\"]+\"/g);
const lengths = (matches && matches.length) ? => a.length - 2): [0];
console.log(lengths.reduce((a,b) => a + b, 0));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment