Skip to content

Instantly share code, notes, and snippets.

@Aetet
Last active August 29, 2015 14:11
Show Gist options
  • Save Aetet/35b4f669dcc109f9ac25 to your computer and use it in GitHub Desktop.
Save Aetet/35b4f669dcc109f9ac25 to your computer and use it in GitHub Desktop.
scaner
function processData(input) {
var arr = input.split('\n');
var len = arr[0];
var res = '';
for (var i = 1;i < arr.length; i++) {
if (i === arr.length - 1) {
res+=divider(arr[i]);
} else {
res+=divider(arr[i])+'\n';
}
}
console.log(res);
}
//YA scaner
var arr = input.split('\n');
var len = arr.shift();
arr = arr[0].split(' ');
console.log(arr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment