A contribution by SeanWilliams

You are given an array of numbers and
must simplify the array by replacing ranges of 3 or more items with the
shorthand #-# equivalent and returning the result as a string, sorted
from lowest to highest

/**

  • Auto-generated code below aims at helping you parse
  • the standard input according to the problem statement.
    **/

var N = readline();

// Write an action using print()
// To debug: printErr(‘Debug messages…’);

for( var i = 0; i < N.length; i++) {
printErr(N[i]);
}

print(‘answer’);

Output

Standard Output Stream:
[
1
,
2
,
5
,

,
70
]
answer

Input is not array, input is string

The input is a string representing an array, what’s your point ?

String is not array.
In condition it is array, not a string.

fix this condition

You are given an array of numbers … where it is string ?

  Input
  Line 1: An array of digits to simplify and reduce.

where it is string ?

abnormal condition initially.
sort out with the type of data, please.

contradiction with the condition
decide this task is not interesting

Please post this puzzle in the right section. :wink:

1 Like

In case you have trouble finding it:

Puzzles -> Community Puzzles -> Create a Puzzle

or direct link:

https://www.codingame.com/games/community/contribute

  • danBhentschel

Also @AlexanderEvpak, stop spamming, you can edit a comment if you need to add more informations, comment again only to answer another user question.