Jimmy needs your help!Will Jimmy fall off his platform?How many Jimmys can fit?Move platforms!Code golf ABC's: The ASCII Box ChallengeJimmy these arrays downStewie's sequence: + * - / + * - /your Uncle help Drunk needsMicrogravity BallDon't get your head in a spin!Rosencrantz and Guildenstern are CodeWill Jimmy fall off his platform?How many Jimmys can fit?

I don't want to be introduced as a "Minority Novelist"

Did William Shakespeare hide things in his writings?

What factors could lead to bishops establishing monastic armies?

What is the highest level of accuracy in motion control a Victorian society could achieve?

What purpose does mercury dichloride have in fireworks?

Sorting a list according to some pre-specified rules

NOLOCK or Read Uncommitted locking / latching behaviours

How do I explain that I don't want to maintain old projects?

How do ballistic trajectories work in a ring world?

Array or vector? Two dimensional array or matrix?

How to evaluate the performance of open source solver?

Why do Martians have to wear space helmets?

How to say "is going" in Russian in "this game is going to perish"

Is it ok for parents to kiss and romance with each other while their 2- to 8-year-old child watches?

How to reclaim personal item I've lent to the office without burning bridges?

In layman's terms, does the Luckstone just give a passive +1 to all d20 rolls and saves except for death saves?

How was the website able to tell my credit card was wrong before it processed it?

Diagram with cylinder shapes and rectangles

What are some bad ways to subvert tropes?

Computer name naming convention for security

How beneficial are flaps when landing with a tailwind?

Passwordless authentication - how and when to invalidate a login code

What does "frozen" mean (e.g. for catcodes)?

What does the multimeter dial do internally?



Jimmy needs your help!


Will Jimmy fall off his platform?How many Jimmys can fit?Move platforms!Code golf ABC's: The ASCII Box ChallengeJimmy these arrays downStewie's sequence: + * - / + * - /your Uncle help Drunk needsMicrogravity BallDon't get your head in a spin!Rosencrantz and Guildenstern are CodeWill Jimmy fall off his platform?How many Jimmys can fit?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








6












$begingroup$


It seems as of recent, there have been a lot a Jimmys falling to their death, as can be seen here, and here where you were asked to determine if Jimmy would fall. It is time we put a stop to this madness and try to save Jimmy.



Jimmy has three body parts /, o, and arranged like this



/o


Platforms are represented with -. Jimmy will fall off their platform iff they have two or more body parts that are not directly above a platform.



Some examples:



 /o
- -------


Jimmy will balance since all their body parts are above a -.



 /o
------ ---


Jimmy will balanced since two body parts are above -s.



 /o
-- ---- --


Jimmy will balance even though they are split between two platforms



 /o
-


Jimmy will not balanced since two body parts are not above a platform.




Since my platform supply is running low, I only have platforms with a length of 5, and it is important we use as few as possible.



Your task is to take an input of Jimmys and output a string of platforms which will save all of the Jimmys in the input. Your output must use as few platforms as possible, but each platform must be 5 -'s wide.



Note that the rule of the platform being 5 - wide, means that each platform must have a space between them. ---------- is not valid in the output since it will be considered a platform of length 10 and not two platforms of length 5.



Test Case's



/o /o/o // input
----- ----- // output


/o /o
----- -----


/o /o // same input as above
----- ----- // this is also valid output


 /o /o
-----


Standard rules apply.



This is code-golf, may the shortest answer win!










share|improve this question











$endgroup$











  • $begingroup$
    Does board position matter if it could go multiple places or anywhere is fine as long as all Jimmys are saved? Is there always at least 1 Jimmy?
    $endgroup$
    – Veskah
    8 hours ago











  • $begingroup$
    @Veskah as long as all Jimmys are saved using the fewest possible platforms, position does not matter, so there will be multiple valid outputs for each input. There is no condition on how many Jimmys there will be in the input, an empty string would be a valid input.
    $endgroup$
    – Quinn
    8 hours ago







  • 2




    $begingroup$
    Test case 4 looks like a scary face
    $endgroup$
    – Expired Data
    8 hours ago










  • $begingroup$
    Jimmy's not happy with you.
    $endgroup$
    – connectyourcharger
    7 hours ago






  • 2




    $begingroup$
    I can see so many Jimmy follow-ups in the future.
    $endgroup$
    – connectyourcharger
    6 hours ago

















6












$begingroup$


It seems as of recent, there have been a lot a Jimmys falling to their death, as can be seen here, and here where you were asked to determine if Jimmy would fall. It is time we put a stop to this madness and try to save Jimmy.



Jimmy has three body parts /, o, and arranged like this



/o


Platforms are represented with -. Jimmy will fall off their platform iff they have two or more body parts that are not directly above a platform.



Some examples:



 /o
- -------


Jimmy will balance since all their body parts are above a -.



 /o
------ ---


Jimmy will balanced since two body parts are above -s.



 /o
-- ---- --


Jimmy will balance even though they are split between two platforms



 /o
-


Jimmy will not balanced since two body parts are not above a platform.




Since my platform supply is running low, I only have platforms with a length of 5, and it is important we use as few as possible.



Your task is to take an input of Jimmys and output a string of platforms which will save all of the Jimmys in the input. Your output must use as few platforms as possible, but each platform must be 5 -'s wide.



Note that the rule of the platform being 5 - wide, means that each platform must have a space between them. ---------- is not valid in the output since it will be considered a platform of length 10 and not two platforms of length 5.



Test Case's



/o /o/o // input
----- ----- // output


/o /o
----- -----


/o /o // same input as above
----- ----- // this is also valid output


 /o /o
-----


Standard rules apply.



This is code-golf, may the shortest answer win!










share|improve this question











$endgroup$











  • $begingroup$
    Does board position matter if it could go multiple places or anywhere is fine as long as all Jimmys are saved? Is there always at least 1 Jimmy?
    $endgroup$
    – Veskah
    8 hours ago











  • $begingroup$
    @Veskah as long as all Jimmys are saved using the fewest possible platforms, position does not matter, so there will be multiple valid outputs for each input. There is no condition on how many Jimmys there will be in the input, an empty string would be a valid input.
    $endgroup$
    – Quinn
    8 hours ago







  • 2




    $begingroup$
    Test case 4 looks like a scary face
    $endgroup$
    – Expired Data
    8 hours ago










  • $begingroup$
    Jimmy's not happy with you.
    $endgroup$
    – connectyourcharger
    7 hours ago






  • 2




    $begingroup$
    I can see so many Jimmy follow-ups in the future.
    $endgroup$
    – connectyourcharger
    6 hours ago













6












6








6


1



$begingroup$


It seems as of recent, there have been a lot a Jimmys falling to their death, as can be seen here, and here where you were asked to determine if Jimmy would fall. It is time we put a stop to this madness and try to save Jimmy.



Jimmy has three body parts /, o, and arranged like this



/o


Platforms are represented with -. Jimmy will fall off their platform iff they have two or more body parts that are not directly above a platform.



Some examples:



 /o
- -------


Jimmy will balance since all their body parts are above a -.



 /o
------ ---


Jimmy will balanced since two body parts are above -s.



 /o
-- ---- --


Jimmy will balance even though they are split between two platforms



 /o
-


Jimmy will not balanced since two body parts are not above a platform.




Since my platform supply is running low, I only have platforms with a length of 5, and it is important we use as few as possible.



Your task is to take an input of Jimmys and output a string of platforms which will save all of the Jimmys in the input. Your output must use as few platforms as possible, but each platform must be 5 -'s wide.



Note that the rule of the platform being 5 - wide, means that each platform must have a space between them. ---------- is not valid in the output since it will be considered a platform of length 10 and not two platforms of length 5.



Test Case's



/o /o/o // input
----- ----- // output


/o /o
----- -----


/o /o // same input as above
----- ----- // this is also valid output


 /o /o
-----


Standard rules apply.



This is code-golf, may the shortest answer win!










share|improve this question











$endgroup$




It seems as of recent, there have been a lot a Jimmys falling to their death, as can be seen here, and here where you were asked to determine if Jimmy would fall. It is time we put a stop to this madness and try to save Jimmy.



Jimmy has three body parts /, o, and arranged like this



/o


Platforms are represented with -. Jimmy will fall off their platform iff they have two or more body parts that are not directly above a platform.



Some examples:



 /o
- -------


Jimmy will balance since all their body parts are above a -.



 /o
------ ---


Jimmy will balanced since two body parts are above -s.



 /o
-- ---- --


Jimmy will balance even though they are split between two platforms



 /o
-


Jimmy will not balanced since two body parts are not above a platform.




Since my platform supply is running low, I only have platforms with a length of 5, and it is important we use as few as possible.



Your task is to take an input of Jimmys and output a string of platforms which will save all of the Jimmys in the input. Your output must use as few platforms as possible, but each platform must be 5 -'s wide.



Note that the rule of the platform being 5 - wide, means that each platform must have a space between them. ---------- is not valid in the output since it will be considered a platform of length 10 and not two platforms of length 5.



Test Case's



/o /o/o // input
----- ----- // output


/o /o
----- -----


/o /o // same input as above
----- ----- // this is also valid output


 /o /o
-----


Standard rules apply.



This is code-golf, may the shortest answer win!







code-golf string ascii-art






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 7 hours ago







Quinn

















asked 8 hours ago









QuinnQuinn

2547 bronze badges




2547 bronze badges











  • $begingroup$
    Does board position matter if it could go multiple places or anywhere is fine as long as all Jimmys are saved? Is there always at least 1 Jimmy?
    $endgroup$
    – Veskah
    8 hours ago











  • $begingroup$
    @Veskah as long as all Jimmys are saved using the fewest possible platforms, position does not matter, so there will be multiple valid outputs for each input. There is no condition on how many Jimmys there will be in the input, an empty string would be a valid input.
    $endgroup$
    – Quinn
    8 hours ago







  • 2




    $begingroup$
    Test case 4 looks like a scary face
    $endgroup$
    – Expired Data
    8 hours ago










  • $begingroup$
    Jimmy's not happy with you.
    $endgroup$
    – connectyourcharger
    7 hours ago






  • 2




    $begingroup$
    I can see so many Jimmy follow-ups in the future.
    $endgroup$
    – connectyourcharger
    6 hours ago
















  • $begingroup$
    Does board position matter if it could go multiple places or anywhere is fine as long as all Jimmys are saved? Is there always at least 1 Jimmy?
    $endgroup$
    – Veskah
    8 hours ago











  • $begingroup$
    @Veskah as long as all Jimmys are saved using the fewest possible platforms, position does not matter, so there will be multiple valid outputs for each input. There is no condition on how many Jimmys there will be in the input, an empty string would be a valid input.
    $endgroup$
    – Quinn
    8 hours ago







  • 2




    $begingroup$
    Test case 4 looks like a scary face
    $endgroup$
    – Expired Data
    8 hours ago










  • $begingroup$
    Jimmy's not happy with you.
    $endgroup$
    – connectyourcharger
    7 hours ago






  • 2




    $begingroup$
    I can see so many Jimmy follow-ups in the future.
    $endgroup$
    – connectyourcharger
    6 hours ago















$begingroup$
Does board position matter if it could go multiple places or anywhere is fine as long as all Jimmys are saved? Is there always at least 1 Jimmy?
$endgroup$
– Veskah
8 hours ago





$begingroup$
Does board position matter if it could go multiple places or anywhere is fine as long as all Jimmys are saved? Is there always at least 1 Jimmy?
$endgroup$
– Veskah
8 hours ago













$begingroup$
@Veskah as long as all Jimmys are saved using the fewest possible platforms, position does not matter, so there will be multiple valid outputs for each input. There is no condition on how many Jimmys there will be in the input, an empty string would be a valid input.
$endgroup$
– Quinn
8 hours ago





$begingroup$
@Veskah as long as all Jimmys are saved using the fewest possible platforms, position does not matter, so there will be multiple valid outputs for each input. There is no condition on how many Jimmys there will be in the input, an empty string would be a valid input.
$endgroup$
– Quinn
8 hours ago





2




2




$begingroup$
Test case 4 looks like a scary face
$endgroup$
– Expired Data
8 hours ago




$begingroup$
Test case 4 looks like a scary face
$endgroup$
– Expired Data
8 hours ago












$begingroup$
Jimmy's not happy with you.
$endgroup$
– connectyourcharger
7 hours ago




$begingroup$
Jimmy's not happy with you.
$endgroup$
– connectyourcharger
7 hours ago




2




2




$begingroup$
I can see so many Jimmy follow-ups in the future.
$endgroup$
– connectyourcharger
6 hours ago




$begingroup$
I can see so many Jimmy follow-ups in the future.
$endgroup$
– connectyourcharger
6 hours ago










3 Answers
3






active

oldest

votes


















2












$begingroup$


Python 2, 72 71 70 bytes





lambda s:S('/',' ',S("[^/ ].5","----- ",s+' '*5))
import re;S=re.sub


Try it online!



Not the prettiest, not sure how to better handle those leftover slashes...






share|improve this answer











$endgroup$




















    2












    $begingroup$


    Python 3, 158 164 160 bytes





    a=input();r=""
    for i,c in enumerate(a):
    try:r[i]
    except:
    if c in"/o":
    r+=(a[i+5<len(a)and i+5or len(a)-1]=="o"and" "or"")+"----- "
    else:r+=" "
    print(r)


    Try it online!



    This is my first code golf answer, and I'm happy it's on a Jimmy question!



    Explanation:



    • a=input();r="": Take in input and initialize a new string r.


    • for i,c in enumerate(a):: Enumerate over the input.


    • try:r[i] ... except:: See if r[i] exists - if not, process the except block.


    • if c in"/o":: Check if the current character is in Jimmy's first two body parts.


    • r+=(a[i+5<len(a)and i+5or len(a)-1]=="o"and" "or"")+"----- ": If so, add a new segment. Add a space before our new segment if another Jimmy head is present in five characters.


    • else:r+=" ": Otherwise, just add a space.


    • print(r): Print our final result.






    share|improve this answer











    $endgroup$












    • $begingroup$
      Pretty close, but I think this actually doesn't works for all test cases. It should use as few platforms as possible and your last example uses 2 when it could be done with 1
      $endgroup$
      – Quinn
      4 hours ago










    • $begingroup$
      @Quinn Shoot. Err, non-competing until I fix that.
      $endgroup$
      – connectyourcharger
      3 hours ago










    • $begingroup$
      @connectyourcharger "non-competing" doesn't validate an invalid solution. I recommend deleting it if you're not going to fix it for some time (e.g. the next few minutes).
      $endgroup$
      – Erik the Outgolfer
      3 hours ago











    • $begingroup$
      @Quinn I fixed it now.
      $endgroup$
      – connectyourcharger
      2 hours ago










    • $begingroup$
      @connectyourcharger Nice!
      $endgroup$
      – Quinn
      1 hour ago


















    1












    $begingroup$

    JavaScript (ES6), 56 bytes





    s=>[...s+1e4].map(c=>(+s?--s:c>?s=5:0)?'-':' ').join``


    Try it online!



    Or 49 bytes if returning an array of characters is acceptable.






    share|improve this answer









    $endgroup$















      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "200"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f187731%2fjimmy-needs-your-help%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2












      $begingroup$


      Python 2, 72 71 70 bytes





      lambda s:S('/',' ',S("[^/ ].5","----- ",s+' '*5))
      import re;S=re.sub


      Try it online!



      Not the prettiest, not sure how to better handle those leftover slashes...






      share|improve this answer











      $endgroup$

















        2












        $begingroup$


        Python 2, 72 71 70 bytes





        lambda s:S('/',' ',S("[^/ ].5","----- ",s+' '*5))
        import re;S=re.sub


        Try it online!



        Not the prettiest, not sure how to better handle those leftover slashes...






        share|improve this answer











        $endgroup$















          2












          2








          2





          $begingroup$


          Python 2, 72 71 70 bytes





          lambda s:S('/',' ',S("[^/ ].5","----- ",s+' '*5))
          import re;S=re.sub


          Try it online!



          Not the prettiest, not sure how to better handle those leftover slashes...






          share|improve this answer











          $endgroup$




          Python 2, 72 71 70 bytes





          lambda s:S('/',' ',S("[^/ ].5","----- ",s+' '*5))
          import re;S=re.sub


          Try it online!



          Not the prettiest, not sure how to better handle those leftover slashes...







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 6 hours ago

























          answered 6 hours ago









          negative sevennegative seven

          5212 silver badges8 bronze badges




          5212 silver badges8 bronze badges























              2












              $begingroup$


              Python 3, 158 164 160 bytes





              a=input();r=""
              for i,c in enumerate(a):
              try:r[i]
              except:
              if c in"/o":
              r+=(a[i+5<len(a)and i+5or len(a)-1]=="o"and" "or"")+"----- "
              else:r+=" "
              print(r)


              Try it online!



              This is my first code golf answer, and I'm happy it's on a Jimmy question!



              Explanation:



              • a=input();r="": Take in input and initialize a new string r.


              • for i,c in enumerate(a):: Enumerate over the input.


              • try:r[i] ... except:: See if r[i] exists - if not, process the except block.


              • if c in"/o":: Check if the current character is in Jimmy's first two body parts.


              • r+=(a[i+5<len(a)and i+5or len(a)-1]=="o"and" "or"")+"----- ": If so, add a new segment. Add a space before our new segment if another Jimmy head is present in five characters.


              • else:r+=" ": Otherwise, just add a space.


              • print(r): Print our final result.






              share|improve this answer











              $endgroup$












              • $begingroup$
                Pretty close, but I think this actually doesn't works for all test cases. It should use as few platforms as possible and your last example uses 2 when it could be done with 1
                $endgroup$
                – Quinn
                4 hours ago










              • $begingroup$
                @Quinn Shoot. Err, non-competing until I fix that.
                $endgroup$
                – connectyourcharger
                3 hours ago










              • $begingroup$
                @connectyourcharger "non-competing" doesn't validate an invalid solution. I recommend deleting it if you're not going to fix it for some time (e.g. the next few minutes).
                $endgroup$
                – Erik the Outgolfer
                3 hours ago











              • $begingroup$
                @Quinn I fixed it now.
                $endgroup$
                – connectyourcharger
                2 hours ago










              • $begingroup$
                @connectyourcharger Nice!
                $endgroup$
                – Quinn
                1 hour ago















              2












              $begingroup$


              Python 3, 158 164 160 bytes





              a=input();r=""
              for i,c in enumerate(a):
              try:r[i]
              except:
              if c in"/o":
              r+=(a[i+5<len(a)and i+5or len(a)-1]=="o"and" "or"")+"----- "
              else:r+=" "
              print(r)


              Try it online!



              This is my first code golf answer, and I'm happy it's on a Jimmy question!



              Explanation:



              • a=input();r="": Take in input and initialize a new string r.


              • for i,c in enumerate(a):: Enumerate over the input.


              • try:r[i] ... except:: See if r[i] exists - if not, process the except block.


              • if c in"/o":: Check if the current character is in Jimmy's first two body parts.


              • r+=(a[i+5<len(a)and i+5or len(a)-1]=="o"and" "or"")+"----- ": If so, add a new segment. Add a space before our new segment if another Jimmy head is present in five characters.


              • else:r+=" ": Otherwise, just add a space.


              • print(r): Print our final result.






              share|improve this answer











              $endgroup$












              • $begingroup$
                Pretty close, but I think this actually doesn't works for all test cases. It should use as few platforms as possible and your last example uses 2 when it could be done with 1
                $endgroup$
                – Quinn
                4 hours ago










              • $begingroup$
                @Quinn Shoot. Err, non-competing until I fix that.
                $endgroup$
                – connectyourcharger
                3 hours ago










              • $begingroup$
                @connectyourcharger "non-competing" doesn't validate an invalid solution. I recommend deleting it if you're not going to fix it for some time (e.g. the next few minutes).
                $endgroup$
                – Erik the Outgolfer
                3 hours ago











              • $begingroup$
                @Quinn I fixed it now.
                $endgroup$
                – connectyourcharger
                2 hours ago










              • $begingroup$
                @connectyourcharger Nice!
                $endgroup$
                – Quinn
                1 hour ago













              2












              2








              2





              $begingroup$


              Python 3, 158 164 160 bytes





              a=input();r=""
              for i,c in enumerate(a):
              try:r[i]
              except:
              if c in"/o":
              r+=(a[i+5<len(a)and i+5or len(a)-1]=="o"and" "or"")+"----- "
              else:r+=" "
              print(r)


              Try it online!



              This is my first code golf answer, and I'm happy it's on a Jimmy question!



              Explanation:



              • a=input();r="": Take in input and initialize a new string r.


              • for i,c in enumerate(a):: Enumerate over the input.


              • try:r[i] ... except:: See if r[i] exists - if not, process the except block.


              • if c in"/o":: Check if the current character is in Jimmy's first two body parts.


              • r+=(a[i+5<len(a)and i+5or len(a)-1]=="o"and" "or"")+"----- ": If so, add a new segment. Add a space before our new segment if another Jimmy head is present in five characters.


              • else:r+=" ": Otherwise, just add a space.


              • print(r): Print our final result.






              share|improve this answer











              $endgroup$




              Python 3, 158 164 160 bytes





              a=input();r=""
              for i,c in enumerate(a):
              try:r[i]
              except:
              if c in"/o":
              r+=(a[i+5<len(a)and i+5or len(a)-1]=="o"and" "or"")+"----- "
              else:r+=" "
              print(r)


              Try it online!



              This is my first code golf answer, and I'm happy it's on a Jimmy question!



              Explanation:



              • a=input();r="": Take in input and initialize a new string r.


              • for i,c in enumerate(a):: Enumerate over the input.


              • try:r[i] ... except:: See if r[i] exists - if not, process the except block.


              • if c in"/o":: Check if the current character is in Jimmy's first two body parts.


              • r+=(a[i+5<len(a)and i+5or len(a)-1]=="o"and" "or"")+"----- ": If so, add a new segment. Add a space before our new segment if another Jimmy head is present in five characters.


              • else:r+=" ": Otherwise, just add a space.


              • print(r): Print our final result.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited 2 hours ago

























              answered 5 hours ago









              connectyourchargerconnectyourcharger

              5781 gold badge3 silver badges16 bronze badges




              5781 gold badge3 silver badges16 bronze badges











              • $begingroup$
                Pretty close, but I think this actually doesn't works for all test cases. It should use as few platforms as possible and your last example uses 2 when it could be done with 1
                $endgroup$
                – Quinn
                4 hours ago










              • $begingroup$
                @Quinn Shoot. Err, non-competing until I fix that.
                $endgroup$
                – connectyourcharger
                3 hours ago










              • $begingroup$
                @connectyourcharger "non-competing" doesn't validate an invalid solution. I recommend deleting it if you're not going to fix it for some time (e.g. the next few minutes).
                $endgroup$
                – Erik the Outgolfer
                3 hours ago











              • $begingroup$
                @Quinn I fixed it now.
                $endgroup$
                – connectyourcharger
                2 hours ago










              • $begingroup$
                @connectyourcharger Nice!
                $endgroup$
                – Quinn
                1 hour ago
















              • $begingroup$
                Pretty close, but I think this actually doesn't works for all test cases. It should use as few platforms as possible and your last example uses 2 when it could be done with 1
                $endgroup$
                – Quinn
                4 hours ago










              • $begingroup$
                @Quinn Shoot. Err, non-competing until I fix that.
                $endgroup$
                – connectyourcharger
                3 hours ago










              • $begingroup$
                @connectyourcharger "non-competing" doesn't validate an invalid solution. I recommend deleting it if you're not going to fix it for some time (e.g. the next few minutes).
                $endgroup$
                – Erik the Outgolfer
                3 hours ago











              • $begingroup$
                @Quinn I fixed it now.
                $endgroup$
                – connectyourcharger
                2 hours ago










              • $begingroup$
                @connectyourcharger Nice!
                $endgroup$
                – Quinn
                1 hour ago















              $begingroup$
              Pretty close, but I think this actually doesn't works for all test cases. It should use as few platforms as possible and your last example uses 2 when it could be done with 1
              $endgroup$
              – Quinn
              4 hours ago




              $begingroup$
              Pretty close, but I think this actually doesn't works for all test cases. It should use as few platforms as possible and your last example uses 2 when it could be done with 1
              $endgroup$
              – Quinn
              4 hours ago












              $begingroup$
              @Quinn Shoot. Err, non-competing until I fix that.
              $endgroup$
              – connectyourcharger
              3 hours ago




              $begingroup$
              @Quinn Shoot. Err, non-competing until I fix that.
              $endgroup$
              – connectyourcharger
              3 hours ago












              $begingroup$
              @connectyourcharger "non-competing" doesn't validate an invalid solution. I recommend deleting it if you're not going to fix it for some time (e.g. the next few minutes).
              $endgroup$
              – Erik the Outgolfer
              3 hours ago





              $begingroup$
              @connectyourcharger "non-competing" doesn't validate an invalid solution. I recommend deleting it if you're not going to fix it for some time (e.g. the next few minutes).
              $endgroup$
              – Erik the Outgolfer
              3 hours ago













              $begingroup$
              @Quinn I fixed it now.
              $endgroup$
              – connectyourcharger
              2 hours ago




              $begingroup$
              @Quinn I fixed it now.
              $endgroup$
              – connectyourcharger
              2 hours ago












              $begingroup$
              @connectyourcharger Nice!
              $endgroup$
              – Quinn
              1 hour ago




              $begingroup$
              @connectyourcharger Nice!
              $endgroup$
              – Quinn
              1 hour ago











              1












              $begingroup$

              JavaScript (ES6), 56 bytes





              s=>[...s+1e4].map(c=>(+s?--s:c>?s=5:0)?'-':' ').join``


              Try it online!



              Or 49 bytes if returning an array of characters is acceptable.






              share|improve this answer









              $endgroup$

















                1












                $begingroup$

                JavaScript (ES6), 56 bytes





                s=>[...s+1e4].map(c=>(+s?--s:c>?s=5:0)?'-':' ').join``


                Try it online!



                Or 49 bytes if returning an array of characters is acceptable.






                share|improve this answer









                $endgroup$















                  1












                  1








                  1





                  $begingroup$

                  JavaScript (ES6), 56 bytes





                  s=>[...s+1e4].map(c=>(+s?--s:c>?s=5:0)?'-':' ').join``


                  Try it online!



                  Or 49 bytes if returning an array of characters is acceptable.






                  share|improve this answer









                  $endgroup$



                  JavaScript (ES6), 56 bytes





                  s=>[...s+1e4].map(c=>(+s?--s:c>?s=5:0)?'-':' ').join``


                  Try it online!



                  Or 49 bytes if returning an array of characters is acceptable.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 4 hours ago









                  ArnauldArnauld

                  87.8k7 gold badges102 silver badges359 bronze badges




                  87.8k7 gold badges102 silver badges359 bronze badges



























                      draft saved

                      draft discarded
















































                      If this is an answer to a challenge…



                      • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


                      • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
                        Explanations of your answer make it more interesting to read and are very much encouraged.


                      • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.


                      More generally…



                      • …Please make sure to answer the question and provide sufficient detail.


                      • …Avoid asking for help, clarification or responding to other answers (use comments instead).




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f187731%2fjimmy-needs-your-help%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      ParseJSON using SSJSUsing AMPscript with SSJS ActivitiesHow to resubscribe a user in Marketing cloud using SSJS?Pulling Subscriber Status from Lists using SSJSRetrieving Emails using SSJSProblem in updating DE using SSJSUsing SSJS to send single email in Marketing CloudError adding EmailSendDefinition using SSJS

                      Кампала Садржај Географија Географија Историја Становништво Привреда Партнерски градови Референце Спољашње везе Мени за навигацију0°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.340°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.34МедијиПодациЗванични веб-сајту

                      19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу