[Question]
      [
Write a program or function that takes in a single-line string. You can assume it only contains [printable ASCII](https://en.wikipedia.org/wiki/ASCII#Printable_characters). Print or return a string of an ASCII art rocket such as
```
  |
 /_\
 |E|
 |a|
 |r|
 |t|
 |h|
 |_|
/___\
 VvV
```
with the input string written from top to bottom on the fuselage. In this case the input was `Earth`. The height of the rocket (including flames) is always the length of the string plus five.
Each line in the output may have up to two trailing spaces and there may be a single optional trailing newline. **The shortest code in bytes wins.**
## More Examples:
```
[empty string]
  |
 /_\
 |_|
/___\
 VvV
a
  |
 /_\
 |a|
 |_|
/___\
 VvV
|0
  |
 /_\
 |||
 |0|
 |_|
/___\
 VvV
\/\
  |
 /_\
 |\|
 |/|
 |\|
 |_|
/___\
 VvV
 _ _ [note trailing space]
  |
 /_\
 | |
 |_|
 | |
 |_|
 | |
 |_|
/___\
 VvV
    [4 spaces]
  |
 /_\
 | |
 | |
 | |
 | |
 |_|
/___\
 VvV
SPACEY
  |
 /_\
 |S|
 |P|
 |A|
 |C|
 |E|
 |Y|
 |_|
/___\
 VvV
```
# Leaderboard
```
var QUESTION_ID=91182,OVERRIDE_USER=26997;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="<h1>"+e.body.replace(OVERRIDE_REG,"")+"</h1>")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/<a/.test(o)&&(o=jQuery(o).text()),s[o]=s[o]||{lang:e.language,user:e.user,size:e.size,link:e.link}});var t=[];for(var o in s)s.hasOwnProperty(o)&&t.push(s[o]);t.sort(function(e,s){return e.lang>s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
```
```
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
```
```
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b"> <div id="answer-list"> <h2>Leaderboard</h2> <table class="answer-list"> <thead> <tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr></thead> <tbody id="answers"> </tbody> </table> </div><div id="language-list"> <h2>Winners by Language</h2> <table class="language-list"> <thead> <tr><td>Language</td><td>User</td><td>Score</td></tr></thead> <tbody id="languages"> </tbody> </table> </div><table style="display: none"> <tbody id="answer-template"> <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody> </table> <table style="display: none"> <tbody id="language-template"> <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody> </table>
```

[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 22 bytes
```
↷¦|_θ__←v↖V→/↑_↑⊕Ｌθ/‖Ｂ
```
[Try it online!](https://tio.run/##S85ILErOT8z5//9R2/ZDy2riz@2Ij3/UNqHsUdu0sEdtk/QftU0E8ic@6pr6fs@aczv0HzVMe79n0f//CiDABQA "Charcoal – Try It Online")
Needs trailing newline in input, due to how Charcoal input works.
[Answer]
# [V](https://github.com/DJMcMayhem/V), 47 46 39 37 35 bytes
```
A_Ó./ |&|\r
a/___\
 VvVHO  |
 /_\
```
[Try it online!](https://tio.run/##K/v/3zFe@vBkPX2FGrWamCKuRP34@PgYLoWwsjBpD38FhRouBf34mP//M1JzcvIVyvOLclIA "V – Try It Online")
This is my first time trying to golf something. There is probably room for improvement since I don't know V, only vim.
Hexdump:
```
00000000: 415f 1bf3 2e2f 207c 267c 5c72 2f67 0a61  A_.../ |&|\r/g.a
00000010: 2f5f 5f5f 5c0a 2056 7656 1b48 4f20 207c  /___\. VvV.HO  |
00000020: 0a20 2f5f 5c                             . /_\
```
[Answer]
# Java 10, ~~102~~ ~~99~~ 81 bytes
```
a->{var r="  |\n /_\\\n |";for(var c:a)r+=c+"|\n |";return r+"_|\n/___\\\n VvV";}
```
3 bytes saved thanks to *@Jules*.
[Try it online.](https://tio.run/##bZBPa4NAEMXv@RTDnlYk2nPFQgg5NhSEQOkWmW5Ms6lZZRyFEP3sdv3Tg213YZf3Zob3Yy7Y4Ppy/Op1jlUFz2jsfQVgLGd0Qp3BfpAACZOxn6ClPiO9vQN6kfO7lXsqRjYa9mAhhh7XT/cGCSgWAK2yEKZKua8V0akgOZT0I3rkx9oX7VSgjGuyQL5InROm6TRyaA4i6vpoCCnrj9yFzFlNYY5wdaxy4hqBJlDOKpZCjHg/CpeyfVhqpUKllhak7v6y3Fk6yctmu3tdejskPos/yxmBx455kcaWNc/Iya3i7BoUNQelK3JupQ20HFsCLrZu4xsivEnPm7P@mZgju/4b)
**Explanation:**
```
a->{                      // Method with character-array parameter and String return-type
  var r="  |\n /_\\\n |"; //  Result-String, starting with the top part:
                          //   |
                          //  /_\
                          //  |
  for(var c:a)            //  Loop over each character in the input-array:
    r+=c                  //   Append the character to the result-String,
        +"|\n |";         //   with trailing:
                          //    |
                          //  |
  return r                //  Return the result-String,
   +"_|\n/___\\\n VvV";}  //  appended with bottom part:
                          //   _|
                          // /___\
                          //  VvV
```
[Answer]
# Excel 2016+, 73 bytes
An anonymous worksheet function that takes input from cell `A1` and outputs to the calling cell
```
="  |
 /_\
 |"&Concat(Mid(A1,Sequence(Len(A1)),1)&"|
 |")&"_|
/___\
 VvV"
```
[Answer]
# C, ~~128~~ ~~97~~ 94 bytes
```
#define P printf(
r(char*s){for(P"  |\n /_\\\n");*s;P" |%c|\n",*s++));P" |_|\n/___\\\n VvV");}
```
Un-golfed:
```
#define P printf(
/* Knock off a few bytes by abusing the preprocessor */
r(char*s) { /* Function r (for rocket) accepting a string */
    for( /* For loop */
        P "  |\n /_\\\n"); /* BEFORE entering loop, print the top part */
        *s; /* Loop until the null at the end of the string is encountered */
        P " |%c|\n",*s++) /* Print a middle section for each char */
    );
    P " |_|\n/___\\\n VvV"); /* Print the bottom part */
}
```
After realizing that I have completely forgotten about `puts()` due to its usual uselessness (I always use `printf()`), I finally got it under 90 bytes, only to realize that someone else had beaten me to it:
```
r(char*s){for(puts("  |\n /_\\");*s;printf(" |%c|\n",*s++));puts(" |_|\n/___\\\n VvV");}
```
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal) `C`, ~~30~~ 24 bytes
```
`|/__`:ḣṫ⁰p\|vp÷„Ḣ‛VvWøM
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyJDIiwiIiwiYHwvX19gOuG4o+G5q+KBsHBcXHx2cMO34oCe4bii4oCbVnZXw7hNIiwiIiwiRWFydGgiXQ==)
*-5 bytes thanks to allxy*
## How?
```
`|/__`:ḣṫ⁰p\|vp÷„Ḣ‛VvWøM
`|/__`                     # Push string "|/__"
      :                    # Duplicate
       ḣ                   # Head extract, push a[0] and a[1:]
        ṫ                  # Tail extract, push a[:-1] and a[-1] (stack: a[0], a[1:-1], a[-1])
         ⁰p                # Prepend the input to this a[-1]
           \|vp            # For each character, prepend "|"
               ÷           # Dump, push all contents to the stack
                „          # Rotate stack left once
                 Ḣ         # Remove head
                  ‛Vv      # Push string "Vv"
                     W     # Wrap stack into a list
                      øM   # Flip brackets and palindromise each
                           # C flag centers and joins on newlines
```
[Answer]
# Pyth, 38 bytes
```
j++"  |
 /_\\"jR_B" |"+Q\_"/___\\
 VvV
```
[Try it online.](http://pyth.herokuapp.com/?code=j%2B%2B%22++%7C%0A+%2F_%5C%5C%22jR_B%22+%7C%22%2BQ%5C_%22%2F___%5C%5C%0A+VvV&input=%22Earth%22&test_suite_input=%22Earth%22%0A%22%22%0A%22a%22%0A%22%7C0%22%0A%22%5C%2F%5C%5C%22%0A%22_+_+%22%0A%22SPACEY%22&debug=0) [Test suite.](http://pyth.herokuapp.com/?code=j%2B%2B%22++%7C%0A+%2F_%5C%5C%22jR_B%22+%7C%22%2BQ%5C_%22%2F___%5C%5C%0A+VvV&input=%22Earth%22&test_suite=1&test_suite_input=%22Earth%22%0A%22%22%0A%22a%22%0A%22%7C0%22%0A%22%5C%2F%5C%5C%22%0A%22_+_+%22%0A%22SPACEY%22&debug=0)
[Answer]
# Scala, 97 94 77 bytes
```
print("  |\n /_\\\n"+args(0).map{" |"+_+"|\n"}.mkString+" |_|\n/___\\\n VvV")
```
[Answer]
# [S.I.L.O.S](https://github.com/rjhunjhunwala/S.I.L.O.S), ~~157 154~~ 143 bytes
```
pL   |
def p print : lbl L Line
pL  /_\
loadL :
a = 256
:a
x = get a
if x c
GOTO e
:c
p  |
pChar x
pL |
a + 1
if x a
:e
pL  |_|
pL /___\
p  VvV
```
It should be fairly readable. Feel free to [try it online!](http://silos.tryitonline.net/#code=cEwgICB8CmRlZiBwIHByaW50IDogbGJsIEwgTGluZQpwTCAgL19cCmxvYWRMIDoKYSA9IDI1Ngo6YQp4ID0gZ2V0IGEKaWYgeCBjCkdPVE8gZQo6YwpwICB8CnBDaGFyIHgKcEwgfAphICsgMQppZiB4IGEKOmUKcEwgIHxffApwTCAvX19fXApwICBWdlY&input=&args=Uy5JLkwuTy5T)
[Answer]
# R, 116 bytes
**Golfed**
```
write(c("  |"," /_\\",sapply(strsplit(scan(,""),"")[[1]],function(y)paste0(" |",y,"|"))," |_|","/___\\"," VvV"),1,1)
```
**Ungolfed**
```
write(                                             # Write to console
      x = c("  |"," /_\\",                         # Add in stock rocket part
        sapply(X = strsplit(scan(,""),"")[[1]],    # Take in rocket part specification, split string, loop over all specs
               FUN = function(y) {
                 paste0(" |",y,"|"))               # Custom build rocket body
                },
        " |_|","/___\\"," VvV"),                   # Add stock parts
      file = 1,                                    # Print to console
      ncolumns = 1)
  |
 /_\
 |s|
 |t|
 |r|
 |s|
 |p|
 |l|
 |i|
 |t|
 |!|
 |_|
/___\
 VvV
```
[Answer]
**Python 3, ~~78~~ 75 Bytes**
```
w="  |\n /_\\"
for i in input(): w+="\n |"+i+"|"
w+="\n |_| \n/___\\ \n VvV"
print(w)
```
Thanks @ValueInk for spotting that I could lose 3 bytes by clearing the `input` function of arguments.
[Answer]
# Lua, 69 68 bytes
```
print([[  |
 /_\
]]..(...):gsub('.',' |%0|\n')..[[ |_|
/___\
 VvV]])
```
Should work with Lua 5.1 - 5.3 (tested with 5.3).
I don't have enough rep to comment on nolan's answer, but this is quite similar.
I'm using `[[long string]]` syntax to save a few bytes by avoiding needing to escape newlines and backslashes.
`gsub` doesn't need to specify a capture because `%0` can be used. (Actually, `%1` still works without a capture as well, but this isn't strictly documented.)
I also trimmed away the input validation; not sure why it was there -- an empty string input (as opposed to empty input) will work fine. Handling a missing `arg[1]` can be done more briefly just by `(arg[1]or''):gsub(...)` anyway, although at this point it is briefer just to switch to `io.read()` and get the input from stdin. Anyway, `...` is a shorter way to get command-line input (even if parens are needed).
[Answer]
# [Perl 6](http://perl6.org/), 51 bytes
```
{"  |
 /_\\
 {("|$_|
"for |.comb,'_')}/___\\
 VvV"}
```
A lambda that takes a string as argument, and returns a string.
[try it online](https://glot.io/snippets/ehvqs6hxl2)
[Answer]
# [Dyalog APL](http://goo.gl/9KrKoM), 50 [bytes](http://meta.codegolf.stackexchange.com/a/9429/43319)
```
↑'/___\' ' VvV',⍨'  |' ' /_\',↓' ','|',⍨'|',⍪⍞,'_'
```
OK, so it may not be the shortest submission, but it *is* the only one that carries the name of [a real rocket manufacturer](https://en.wikipedia.org/wiki/Applied_Physics_Laboratory):
```
  |
 /_\
 |A|
 |P|
 |L|
 |_|
/___\
 VvV
```
[TryAPL online!](http://tryapl.org/?a=%7B%u2191%27/___%5C%27%20%27%20VvV%27%2C%u2368%27%20%20%7C%27%20%27%20/_%5C%27%2C%u2193%27%20%27%2C%27%7C%27%2C%u2368%27%7C%27%2C%u236A%u2375%2C%27_%27%7D%A8%27%27%20%27a%27%20%27%7C0%27%20%27%5C/%5C%27%20%27%20_%20_%20%27%20%27%20%20%20%20%27%20%27SPACEY%27&run)
[Answer]
## [><>](http://esolangs.org/wiki/Fish), 60 bytes
```
'  |'a' /_\'av
a$v?(0:i'|| '<
'r\~'_'$a'/___\'a' VvV
 o>l?!;
```
Pretty simple really. lots of strings, the newlines are annoying.
[Try it online](https://fishlanguage.com/playground/Zh3YMSH3Ba2vWGvWo)
```
  |
 /_\
 |>|
 |<|
 |>|
 |_|
/___\
 VvV
```
[Answer]
# Swift, 99 byte
```
let f:(String)->String={$0.characters.reduce("  |\n /_\\\n"){$0+" |\($1)|\n"}+" |_|\n/___\\\n VvV"}
```
Use like this:
```
print(f("Some String"))
```
Result:
```
  |
 /_\
 |S|
 |o|
 |m|
 |e|
 | |
 |S|
 |t|
 |r|
 |i|
 |n|
 |g|
 |_|
/___\
 VvV
```
[Answer]
# R, 101 bytes
This is an improvement on [Frédéric's answer](https://codegolf.stackexchange.com/a/91275/59052). I eliminated the variable definition, the for-loop, and the need for the `sep=""` argument.
```
cat("  |\n /_\\\n",sapply(strsplit(scan(,""),""),function(x)paste0("|",x,"|\n")),"|_|\n/___\\\n VvV")
```
Ungolfed:
```
cat("  |\n /_\\\n",                      # Print top of rocket
    sapply(
      strsplit(scan(,""),""),            # Take stdin and convert to list of chars
      function(x)paste0("|",x,"|\n")),   # Print letters
    ,"|_|\n/___\\\n VvV")                # Print bottom and FLAMES
```
I'm sure that there is still some improvement possible.
[Answer]
## Perl, 51 bytes
**50 bytes code + 1 for `-p`.**
```
s/./$&|
 |/g;s~^~  |
 /_\\
 |~;s~$~_|
/___\\
 VvV~
```
### Usage
```
perl -pe 's/./$&|
 |/g;s~^~  |
 /_\\
 |~;s~$~_|
/___\\
 VvV~' <<< earth
  |
 /_\
 |e|
 |a|
 |r|
 |t|
 |h|
 |_|
/___\
 VvV
```
```
perl -pe 's/./$&|
 |/g;s~^~  |
 /_\\
 |~;s~$~_|
/___\\
 VvV~' <<< ''
  |
 /_\
 |_|
/___\
 VvV
```
```
perl -pe 's/./$&|
 |/g;s~^~  |
 /_\\
 |~;s~$~_|
/___\\
 VvV~' <<< '0|'
  |
 /_\
 |0|
 |||
 |_|
/___\
 VvV
```
[Answer]
# Dart, 80 bytes
```
g(s)=>'  |\n /_\\\n${s.split('').map((s)=>' |$s|\n').join()} |_|\n/___\\\n VvV';
```
Running it through
```
main()=>print(g("Jasper"));
```
Gives:
```
  |
 /_\
 |J|
 |a|
 |s|
 |p|
 |e|
 |r|
 |_|
/___\
 VvV
```
[Answer]
## [GNU sed](https://www.gnu.org/software/sed/), ~~54~~ ~~49~~ 48 bytes
This was my first answer to a challenge on this site. The solution is simple, mainly printing, so I spent some time making sure that it can't be golfed anymore.
```
s:.:\n |&|:g
s::  |& /_\\&:
a\ |_|\n/___\\\n VvV
```
**[Try it online!](https://tio.run/nexus/sed#@19spWcVk6dQo1Zjlc5VbGWlAGQq6MfHxKhZcSXGKNTE18Tk6cfHAwWAqsLKwv7/93MMdgQA)**
Fast forward half a year later, I rewrote the script, used a trick for good measure and golfed it down to 1 byte shorter. Now that's progress!
**Explanation:** the pattern space at each step is mentioned for clarity, given the input example "GO"
```
s:.:\n |&|:g
   # turn each input char into a section of the rocket (\n |G|\n |O|)
s::  |& /_\\&:
   # 's::' is a trick; the search part is actually the one from the previous 's'
   #command, i.e. a char. Only the first char, '\n', the modifier 'g' is not
   #inherited. The replace part is the head of the rocket. (  |\n /_\\n |G|\n |O|)
a\ |_|\n/___\\\n VvV
   # append the tail of the rocket, plus implicit printing at the end
  |
 /_\
 |G|
 |O|
 |_|
/___\
 VvV
```
[Answer]
# [CJam](https://sourceforge.net/p/cjam), 38 bytes
```
"  |
 /_\
 |"q'_+"|
 |"*"|
/___\
 VvV"
```
[Try it online!](https://tio.run/nexus/cjam#@6@koFDDpaAfH8OlUKNUqB6vrVQDYmkBKf34eJBwWFmY0v//NQYA "CJam – TIO Nexus")
**Explanation**
Nothing fancy, pretty straightforward.
```
"  |\n /_\\n |"                              Push the top of the rocket
               q'_+                          Push the input and append an underscore
                   "|\n |"*                  Join the characters of the input with the sides
                           "|\n/___\\n VvV"  Push the bottom of the rocket
```
[Answer]
# Common Lisp, ~~85~~ 74 bytes
```
(lambda(s)(format t"  |
 /_\\
~{ |~a|
~} |_|
/___\\
 VvV"(coerce s'list)))
```
[Try it online!](https://tio.run/##FcwxDoAgDADAnVc0XWwnX@EXmEhIRY0mGgwQFytfR11vuLBv@WyNaJdjnIQy0xLTIQUKAqiB3jtn6g1aRU19QL2a3vtfwV4WKcQ5hRly902FmXGQVFbk1l4 "Common Lisp – Try It Online")(I added some bytes to call this anonymous function)
For changing part we take input as string.
```
~{ |~a|         ;we loop through all characters of string
    ~}          ;printing characters from list
(coerce s'list) ;string is converted into list of characters later used by above loop
```
[Answer]
# [Keg](https://github.com/JonoCode9374/Keg), 52 characters
```
?(\|'\| \
)\\\_\/ \
\|  ^\
 \|\_\|\
\/\_\_\_\\\
 VvV
```
Only tricky point is that Keg has no strings, the input is pushed to stack character by character. So the processing order is: read input (`?`) and turn it into middle section, append top section reversed, reverse them all (`^`), append bottom section.
(Note that the interpreter (TIO implementation?) does not support absolutely no input. Empty input is specified as single newline, which will not be processed anyway.)
[Try it online!](https://tio.run./##y05N///fXiOmRj2mRiGGSzMmJiY@Rh/IAnIV4mK4FGJqgAI1QL4@kAbBGKBgWFnY//@uiUUlGQA "Keg – Try It Online")
[Answer]
# C - 84 Bytes
```
f(char*s){puts("  |\n /_\\");while(*s)printf(" |%c|\n", *s++);puts(" |_|\n/___\\\n VvV");}
```
**Ungolfed**
```
f(char* s)
{
    puts("  |\n /_\\");
    while(*s)
        printf(" |%c|\n", *s++);
    puts(" |_|\n/___\\\n VvV");
}
```
**Explanation**
Function that receives a string prints it into the ascii-rocket. Tested on GCC, generates some warnings if not compiled with -std=c89.
[Answer]
# [MathGolf](https://github.com/maxbergmark/mathgolf/blob/master/math_golf.txt), 36 [bytes](https://github.com/maxbergmark/mathgolf/blob/master/code_page.py)
```
ù  |ÿ /_\è'_▐û |\+mñn'/ÿ___\+ÿ VvV]n
```
Input as a list of characters.
[Try it online.](https://tio.run/##y00syUjPz0n7///wTgWFmsP7FfTjYw6vUI9/NG3C4d0KNTHauYc35qnrH94fHx8fow2UDysLi837/1/dVV1HPRGIi4C4BIgz1Lm4gAJc6jVAjgGQjokBMvSBGMjgUlcAMuKBGEFDxBCYSz0YSAcAsSMQOwMxyIpIdQA)
**Explanation:**
```
ù  |          # Push string "  |"
ÿ /_\         # Push string " /_\"
è             # Push the inputs as string-array
 '_▐         '# Append a trailing "_"
    û |\+     # Prepend " |" in front of each string
         mñ   # Palindromize each string in the list
           n  # Join it with newline delimiter
'/           '# Push string "/"
  ÿ___\       # Append string "___\": "/___\"
ÿ VvV         # Push string " VvV"
]             # Wrap the entire stack into a list
 n            # Join it with newline delimiter
              # (after which the entire stack is output implicitly)
```
[Answer]
# [K (ngn/k)](https://codeberg.org/ngn/k), ~~65~~ 60 bytes
```
`0:"  |\n /_\\";{`0:" |",x,"|"}'$1:0;`0:" |_|\n/___\\\n VvV"
```
[Try it online!](https://ngn.bitbucket.io/k#eJwrtjKwMrBOMLBSUlCoiclT0I+PiVGyrgYL1CjpVOgo1SjVqqtoFUPU1MQDFenHxwNVARWHlYUpAQBBrRJs)
-5 bytes thanks to Razetime!
First ever K answer! May not be perfect, but it's pretty good!
Explaination:
```
`0:"  |\n /_\\" / Print the top of the rocket
{`0:" |",x,"|"} / Print " |$x|"
'$1:0; / For each character in the user input
/ Note: ';' is important because without it
/ the console will also output `(:: :: ...)`
`0:" |_|\n/___\\\n VvV" / Print the end of the rocket
```
[Answer]
## Batch, 128 bytes
```
@echo off
set s=%1_
echo   ^|
echo  /_\
:l
echo  ^|%s:~0,1%^|
set s=%s:~1%
if not "%s%"=="" goto l
echo /___\
echo  VvV
```
[Answer]
## C#, ~~130~~ ~~111~~ 95 bytes
```
s=>{var a="  |\n /_\\\n";foreach(var c in s)a+=" |"+c+"|\n";a+=" |_|\n/___\\\n VvV";return a;};
```
*Saved 16 bytes thanks to Kevin Cruijssen*
[Answer]
# Javascript (using external lib - Enumerable) (84 bytes)
```
n=>" |\n /_\\\n"+_.From(n).WriteLine(x=>" |"+x+"|")+(n?"\n":'')+" |_|\n/___\\\n VvV"
```
Link to lib: <https://github.com/mvegh1/Enumerable>
Code explanation: Pretty straight forward. Just boilerplates the rocketship template (top and bottom), and concats the fuselage string in the middle. Whats eating up a lot of bytes is the check if the input is truthy, because for an empty string it's wrong to add a newline to the beginning of the bottom template
I love how the native JS answer blows this away...
[![enter image description here](https://i.stack.imgur.com/Q1sAl.png)](https://i.stack.imgur.com/Q1sAl.png)
[Answer]
# Haskell, ~~67 63~~ 59 bytes
```
(++"_|\n/___\\\n VvV").("  |\n /_\\\n |"++).(>>=(:"|\n |"))
```
Thanks to Damien it's now essentially the same as xnor's answer, just in point-free notation. [Ideone it!](http://ideone.com/MYt2Mh)
]


[Question]
      [
Don't you love those [exploded-view diagrams](https://en.wikipedia.org/wiki/Exploded-view_drawing)  in which a machine or object is taken apart into its smallest pieces?
[![enter image description here](https://i.stack.imgur.com/6lcse.jpg)](https://i.stack.imgur.com/6lcse.jpg)
Let's do that to a string!
# The challenge
Write a program or function that
1. inputs a string containing only **printable ASCII characters**;
2. dissects the string into **groups of non-space equal characters** (the "pieces" of the string);
3. outputs those groups in any convenient format, with some **separator between groups**.
For example, given the string
```
Ah, abracadabra!
```
the output would be the following groups:
```
!
,
A
aaaaa
bb
c
d
h
rr
```
Each group in the output contains equal characters, with spaces removed. A newline has been used as separator between groups. More about allowed formats below.
# Rules
The **input** should be a string or an array of chars. It will only contain printable ASCII chars (the inclusive range from space to tilde). If your language does not support that, you can take the input in the form of numbers representing ASCII codes.
You can assume that the input contains **at least one non-space character**.
The **output** should consist of **characters** (even if the input is by means of ASCII codes). There has to be an unambiguous **separator between groups**, different than any non-space character that may appear in the input.
If the output is via function return, it may also be an array or strings, or an array of arrays of chars, or similar structure. In that case the structure provides the necessary separation.
A separator **between characters** of each group is **optional**. If there is one, the same rule applies: it can't be a non-space character that may appear in the input. Also, it can't be the same separator as used between groups.
Other than that, the format is flexible. Here are some examples:
* The groups may be strings separated by newlines, as shown above.
* The groups may be separated by any non-ASCII character, such as `¬`. The output for the above input would be the string:
```
!¬,¬A¬aaaaa¬bb¬c¬d¬h¬rr
```
* The groups may be separated by *n*>1 spaces (even if *n* is variable), with chars between each group separated by a single space:
```
!  ,    A   a a a a a    b b  c       d   h  r r
```
* The output may also be an array or list of strings returned by a function:
```
['!', 'A', 'aaaaa', 'bb', 'c', 'd', 'h', 'rr']
```
* Or an array of char arrays:
```
[['!'], ['A'], ['a', 'a', 'a', 'a', 'a'], ['b', 'b'], ['c'], ['d'], ['h'], ['r', 'r']]
```
Examples of formats that are not allowed, according to the rules:
* A comma can't be used as separator (`!,,,A,a,a,a,a,a,b,b,c,d,h,r,r`), because the input may contain commas.
* It's not accepted to drop the separator between groups (`!,Aaaaaabbcdhrr`) or to use the same separator between groups and within groups (`! , A a a a a a b b c d h r r`).
The groups may appear in **any order** in the output. For example: alphabetical order (as in the examples above), order of first appearance in the string, ... The order need not be consistent or even deterministic.
Note that the input cannot contain newline characters, and `A` and `a` are different characters (grouping is **case-sentitive**).
Shortest code in bytes wins.
# Test cases
In each test case, first line is input, and the remaining lines are the output, with each group in a different line.
* Test case 1:
```
Ah, abracadabra!
!
,
A
aaaaa
bb
c
d
h
rr
```
* Test case 2:
```
\o/\o/\o/
///
\\\
ooo
```
* Test case 3:
```
A man, a plan, a canal: Panama!
!
,,
:
A
P
aaaaaaaaa
c
ll
mm
nnnn
p
```
* Test case 4:
```
"Show me how you do that trick, the one that makes me scream" she said
""
,
S
aaaaa
cc
dd
eeeeeee
hhhhhh
ii
kk
mmmm
n
ooooo
rr
ssss
tttttt
u
ww
y
```

[Answer]
## Ruby, 35 bytes
```
->s{(?!..?~).map{|x|s.scan x}-[[]]}
```
Tried to turn the problem upside down to save some bytes.
Instead of starting with the string, start with the possible character set.
[Answer]
## Perl6, ~~48~~ ~~47~~ 45
```
slurp.comb.Bag.kv.map:{$^a.trim&&say $a x$^b}
```
Thanks to manatwork for the improvements.
[Answer]
# MATL, 7 bytes
```
Xz!t7XQ
```
[**MATL Online Demo**](https://matl.io/?code=Xz%21t7XQ&inputs=%27Ah%2C+abracadabra%21%27&version=19.0.0)
[Answer]
# [Japt](https://github.com/ETHproductions/japt) [`-R`](https://codegolf.meta.stackexchange.com/a/14339/), 3 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
¸¬ü
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LVI&code=uKz8&input=IkEgbWFuLCBhIHBsYW4sIGEgY2FuYWw6IFBhbmFtYSEi)
```
¸¬ü     :Implicit input of string
¸       :Split on spaces
 ¬      :Join
  ü     :Group & sort
        :Implicit output joined with newlines
```
[Answer]
# [Arturo](https://arturo-lang.io), 26 bytes
```
$=>[sort&--` `|chunk=>[&]]
```
[Try it!](http://arturo-lang.io/playground?KjLKeY)
Takes input as a list of characters.
```
$=>[           ; a function where input is assigned to &
    sort       ; sort
    &--` `     ; input with spaces removed
    |          ; then
    chunk=>[&] ; split into groups of equal contiguous characters
]              ; end function
```
[Answer]
# [Zsh](https://www.zsh.org/), 35 bytes
[Try it online!](https://tio.run/##qyrO@P8/Lb9IoUJBQ6Vao7TYykrTUF9foVbTxsZGpRrIjI5TqYit/f//v2OGjkJiUlFicmIKiFIEAA)
```
for x (${(us::)1// })<<<${1//[^$x]}
```
Input via argument `$1`. Expression `${(us::)1// }` splits `$1` to array of unique chars, and removes spaces. Iterate over the unique array. For each `x`, print `$1`, removing non-`x` chars.
~~[45 bytes](https://tio.run/##qyrO@P/f0VZDpVqj2MpK07BW0zotv0ihQgEkUqrpWKtpY2MDZPpmAWUdlVUqav8D1WfoKCQmFSUmJ6aAKEUA "Zsh – Try It Online")~~: `A=(${(s::)1});for x (${(u)A})<<<${(Mj::)A#$x}`
[Answer]
# Ruby, 46 bytes
[Try it online!](https://repl.it/Cr3J)
```
->s{(s.chars-[' ']).uniq.map{|c|c*s.count(c)}}
```
My original full program version, 48 bytes after adding the `n` flag:
```
p gsub(/\s/){}.chars.uniq.map{|c|c*$_.count(c)}
```
[Answer]
# Python, 107
Could be shortened by lambda, but later
```
x=sorted(input())
i=0
while i<len(x):x[i:]=['  '*(x[i]!=x[i-1])]+x[i:];i-=~(x[i]!=x[i-1])
print("".join(x))
```
[Answer]
## CJam, 10 bytes
```
{S-$e`::*}
```
An unnamed block that expects the string on top of the stack and replaces it with a list of strings.
[Try it online!](http://cjam.tryitonline.net/#code=IlwiU2hvdyBtZSBob3cgeW91IGRvIHRoYXQgdHJpY2ssIHRoZSBvbmUgdGhhdCBtYWtlcyBtZSBzY3JlYW1cIiBzaGUgc2FpZCIKCntTLSRlYDo6Kn0KCn5w&input=)
### Explanation
```
S-  Remove spaces.
$   Sort.
e`  Run-length encode, gives pairs [R C], where R is the run-length and
    C is the character.
::* Repeat the C in each pair R times.
```
[Answer]
# Common Lisp, 123
```
(lambda(s &aux(w(string-trim" "(sort s'char<))))(princ(elt w 0))(reduce(lambda(x y)(unless(char= x y)(terpri))(princ y))w))
```
Ungolfed:
```
(lambda (s &aux (w (string-trim " " (sort s 'char<))))
  (princ (elt w 0))
  (reduce
    (lambda (x y)
      (unless (char= x y) (terpri))
      (princ y))
  w))
```
Not the most golf friendly language. This could probably be modified to return list of lists instead of printing string.
[Answer]
# Emacs, 36 keystrokes
`C-SPACE` `C-E``M-x``sort-r``TAB``RETURN``.``RETURN``.``RETURN``C-A``C-M-S-%``\(\(.\)\2*\)``RETURN``\1``C-Q``C-J``RETURN``!`
### Result
`A man, a plan, a canal: Panama!` -->
```
!
,,
:
A
P
aaaaaaaaa
c
ll
mm
nnnn
p
```
### Explanation
1. `C-SPACE` `C-E`
2. `M-x` `sort-r``TAB` `RETURN` `.``RETURN` `.``RETURN`
3. `C-A`
4. `C-M-S-%` `\(\(.\)\2*\)``RETURN``\1` `C-Q` `C-J``RETURN` `!`
1. Select the input line;
2. Call `sort-regexp-fields` with arguments `.` and `.`;
	* Argument #1: *Regexp scpecifying records to sort*
	* Argument #2: *Regexp scpecifying key within records*
3. Return at line start;
4. Apply regexp substitution `\(\(.\)\2*\)` -> `\1\n` on all matches.
[Answer]
## Pyke, ~~16~~ 9 bytes
```
d-}F/i*d+
```
[Try it here!](http://pyke.catbus.co.uk/?code=d-%7DF%2Fi%2ad%2B&input=Ah%2C+abracadabra%21%21&warnings=0)
[Answer]
# PHP, 67 bytes
Space as separator
PHP5 using deprecated `ereg_replace` function.
```
for(;++$i<128;)echo ereg_replace("[^".chr($i)."]","",$argv[1])." ";
```
PHP7, 73 bytes
```
for(;++$i<128;)echo str_repeat($j=chr($i),substr_count($argv[1],$j))." ";
```
Using built in is worse :(
```
foreach(array_count_values(str_split($argv[1]))as$a=>$b)echo str_repeat($a,$b)." ";
```
[Answer]
# Perl, 31 bytes
Includes +1 for `-p`
Run with input on STDIN:
```
explode.pl <<< "ab.ceaba.d"
```
`explode.pl`:
```
#!/usr/bin/perl -p
s%.%$&x s/\Q$&//g.$/%eg;y/
//s
```
If you don't care about spurious newlines inbetween the lines the following 24 bytes version works too:
```
#!/usr/bin/perl -p
s%.%$&x s/\Q$&//g.$/%eg
```
[Answer]
# Oracle SQL 11.2, 123 bytes
```
SELECT LISTAGG(c)WITHIN GROUP(ORDER BY 1)FROM(SELECT SUBSTR(:1,LEVEL,1)c FROM DUAL CONNECT BY LEVEL<=LENGTH(:1))GROUP BY c;
```
Un-golfed
```
SELECT LISTAGG(c)WITHIN GROUP(ORDER BY 1)
FROM (SELECT SUBSTR(:1,LEVEL,1)c FROM DUAL CONNECT BY LEVEL<=LENGTH(:1))
GROUP BY c
```
[Answer]
# [S.I.L.O.S](https://esolangs.org/wiki/S.I.L.O.S) 265
The (non competing) code better input format is at the bottom, feel free to [try it online!](http://silos.tryitonline.net/#code=CmRlZiA6IGxibApsb2FkTGluZSA6CmEgPSAyNTYKOmEKOnMKeCA9IGdldCBhCnogPSB4CnogLSAzMgp6IHwKaWYgeiB1CmEgKyAxCkdPVE8gcwo6dQppZiB4IGMKR09UTyBlCjpjCmIgPSB4CmIgKyA1MTIKYyA9IGdldCBiCmMgKyAxCnNldCBiIGMKYSArIDEKaWYgeCBhCjplCmEgPSA1MTIKYiA9IDc2OApsID0gMTAKOloKaiA9IGEKaiAtIGIKaWYgaiB6CnogPSBnZXQgYQpjID0gYQpjIC0gNTEyCjozCmlmIHogQwpwcmludENoYXIgbAphICsgMQpHT1RPIFoKOkMKcHJpbnRDaGFyIGMKeiAtIDEKR09UTyAzCjp6&input=&args=VGhpcyBpcyB0ZXN0IGlucHV0IHdpdGhvdXQgYW55IG5ld2xpbmVzLiBBQUFBQUEgQkJCQkIgVGhlIHF1aWNrIEJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2cgMTIzNDU2Nzg5MCE)
```
def : lbl
loadLine :
a = 256
:a
:s
x = get a
z = x
z - 32
z |
if z u
a + 1
GOTO s
:u
if x c
GOTO e
:c
b = x
b + 512
c = get b
c + 1
set b c
a + 1
if x a
:e
a = 512
b = 768
l = 10
:Z
j = a
j - b
if j z
z = get a
c = a
c - 512
:3
if z C
printChar l
a + 1
GOTO Z
:C
printChar c
z - 1
GOTO 3
:z
```
Input for the above is a series of command line arguments representing ascii values, terminated with a zero.[Try it online!](http://silos.tryitonline.net/#code=CmRlZiA6IGxibAo6YQo6cwpyZWFkSU8gOgp4ID0gaQp6ID0geAp6IC0gMzIKeiB8CmlmIHogdQpHT1RPIHMKOnUKaWYgeCBjCkdPVE8gZQo6YwpiID0geApiICsgNTEyCmMgPSBnZXQgYgpjICsgMQpzZXQgYiBjCmlmIHggYQo6ZQphID0gNTEyCmIgPSA3NjgKbCA9IDEwCjpaCmogPSBhCmogLSBiCmlmIGogegp6ID0gZ2V0IGEKYyA9IGEKYyAtIDUxMgo6MwppZiB6IEMKcHJpbnRDaGFyIGwKYSArIDEKR09UTyBaCjpDCnByaW50Q2hhciBjCnogLSAxCkdPVE8gMwo6eg&input=NjQ&args=NjU+MTIz+NjU+NjU+NjU+NjY+NjY+MA).
---
For a more reasonable method of input we must up the byte count (and use features that were nonexistent before the writing of this challenge).

For 291 bytes we get the following code.
```
\
def : lbl
loadLine :
a = 256
:a
:s
x = get a
z = x
z - 32
z |
if z u
a + 1
GOTO s
:u
if x c
GOTO e
:c
b = x
b + 512
c = get b
c + 1
set b c
a + 1
if x a
:e
a = 512
b = 768
l = 10
:Z
j = a
j - b
if j z
z = get a
c = a
c - 512
:3
if z C
printChar l
a + 1
GOTO Z
:C
printChar c
z - 1
GOTO 3
:z
```
Feel free to [test this version online!](http://silos.tryitonline.net/#code=CmRlZiA6IGxibApsb2FkTGluZSA6CmEgPSAyNTYKOmEKOnMKeCA9IGdldCBhCnogPSB4CnogLSAzMgp6IHwKaWYgeiB1CmEgKyAxCkdPVE8gcwo6dQppZiB4IGMKR09UTyBlCjpjCmIgPSB4CmIgKyA1MTIKYyA9IGdldCBiCmMgKyAxCnNldCBiIGMKYSArIDEKaWYgeCBhCjplCmEgPSA1MTIKYiA9IDc2OApsID0gMTAKOloKaiA9IGEKaiAtIGIKaWYgaiB6CnogPSBnZXQgYQpjID0gYQpjIC0gNTEyCjozCmlmIHogQwpwcmludENoYXIgbAphICsgMQpHT1RPIFoKOkMKcHJpbnRDaGFyIGMKeiAtIDEKR09UTyAzCjp6&input=&args=VGhpcyBpcyB0ZXN0IGlucHV0IHdpdGhvdXQgYW55IG5ld2xpbmVzLiBBQUFBQUEgQkJCQkIgVGhlIHF1aWNrIEJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2cgMTIzNDU2Nzg5MCE). The backslash is unnecessary but is there to show the important leading line feed.
[Answer]
## ARM machine code on Linux, 60 bytes
Hex Dump:
```
b590 4c0d f810 2b01 b11a 58a3 3301 50a3 e7f8 6222 2704 2001 f1ad 0101 2201 237f 5ce5 b135 700b df00 3d01 d8fc 250a 700d df00 3b01 d8f4 bd90 000200bc
```
This function basically creates an array of size 128, and whenever it reads a character from the input string it increment's the value at that characters position. Then it goes back through the array and prints each character array[character] times.
Ungolfed Assembly (GNU syntax):
```
.syntax unified
.bss @bss is zero-initialized data (doesn't impact code size)
countArray:
    .skip 128 @countArray[x] is the number of occurances of x
.text
.global expStr
.thumb_func
expstr:
    @Input: r0 - a NUL-terminated string.
    @Output: Groups of characters to STDOUT
    push {r4,r7,lr}
    ldr r4,=countArray @Load countArray into r4
    readLoop:
        ldrb r2,[r0],#1 @r2=*r0++
        cbz r2,endReadLoop @If r2==NUL, break
        ldr r3,[r4,r2] @r3=r4[r2]
        adds r3,r3,#1 @r3+=1
        str r3,[r4,r2] @r4[r2]=r3
        b readLoop @while (true)
    endReadLoop:
    @Now countArray[x] is the number of occurances of x.
    @Also, r2 is zero
    str r2,[r4,#' ] @'<character> means the value of <character>
    @What that just did was set the number of spaces found to zero.
    movs r7,#4 @4 is the system call for write
    movs r0,#1 @1 is stdout
    sub r1,sp,#1 @Allocate 1 byte on the stack
    @Also r1 is the char* used for write
    movs r2,#1 @We will print 1 character at a time
    movs r3,#127 @Loop through all the characters
    writeLoop:
        ldrb r5,[r4,r3] @r5=countArray[r3]
        cbz r5,endCharacterLoop @If we're not printing anything, go past the loop
        strb r3,[r1] @We're going to print byte r3, so we store it at *r0
        characterLoop:
            swi #0 @Make system call
            @Return value of write is number of characters printed in r0
            @Since we're printing one character, it should just return 1, which
            @means r0 didn't change.
            subs r5,r5,#1
            bhi characterLoop
        @If we're here then we're done printing our group of characters
        @Thus we just need to print a newline.
        movs r5,#10 @r5='\n' (reusing r5 since we're done using it as a loop counter
        strb r5,[r1]
        swi #0 @Print the character
        endCharacterLoop:
        subs r3,r3,#1
        bhi writeLoop @while (--r3)
    pop {r4,r7,pc}
.ltorg @Store constants here
```
Testing script (also assembly):
```
.global _start
_start:
    ldr r0,[sp,#8] @Read argv[1]
    bl expstr @Call function
    movs r7,#1 @1 is the system call for exit
    swi #0 @Make system call
```
[Answer]
# Scala, 53 bytes
```
def?(s:String)=s.filter(_!=' ').groupBy(identity).map{_._2.mkString}
```
When run with REPL:
```
scala> ?("Ah, abracadabra!")
res2: scala.collection.immutable.Iterable[String] = List(!, A, aaaaa, ,, bb, c, h, rr, d)
scala> print(res2.mkString("\n"))
!
A
aaaaa
,
bb
c
h
rr
d
```
EDIT:
Forgot to filter spaces
[Answer]
## Clojure, 46
```
#(partition-by identity(sort(re-seq #"\S" %)))
```
Long and descriptive function names for simplest of things, yeah.
[Answer]
# PowerShell, 65
@TimmyD has the shorter answer but I don't have enough rep to comment. Here's my answer in 65 bytes.
I didn't think to use `group` and I didn't know that you could stick `-join` in front of something instead of `-join""` on the end and save two characters (using that would make my method 63).
```
([char[]]$args[0]-ne32|sort|%{if($l-ne$_){"`n"};$_;$l=$_})-join""
```
My method sorts the array, then loops through it and concatenates characters if they match the preceding entry, inserting a newline if they do not.
[Answer]
# Clojure (55 bytes)
```
(defn f[s](map(fn[[a b]](repeat b a))(frequencies s)))
```
Test Cases:
```
(f "Ah, abracadabra!")
;;=> ((\space) (\!) (\A) (\a \a \a \a \a) (\b \b) (\c) (\d) (\h) (\,) (\r \r))
(f "\\o/\\o/\\o/")
;;=> ((\\ \\ \\) (\o \o \o) (\/ \/ \/))
(f "A man, a plan, a canal: Panama!")
;;=> ((\space \space \space \space \space \space) (\!) (\A) (\a \a \a \a \a \a \a \a \a) (\c) (\, \,) (\l \l) (\m \m) (\n \n \n \n) (\P) (\p) (\:))
(f "\"Show me how you do that trick, the one that makes me scream\" she said")
;;=> ((\space \space \space \space \space \space \space \space \space \space \space \space \space \space) (\a \a \a \a \a) (\" \") (\c \c) (\d \d) (\e \e \e \e \e \e \e) (\h \h \h \h \h \h) (\i \i) (\k \k) (\,) (\m \m \m \m) (\n) (\o \o \o \o \o) (\r \r) (\S) (\s \s \s \s) (\t \t \t \t \t \t) (\u) (\w \w) (\y))
```
[Answer]
# Java 8, ~~121~~ ~~120~~ ~~110~~ 103 Bytes
```
s->s.chars().distinct().filter(c->c!=32)
    .forEach(c->out.println(s.replaceAll("[^\\Q"+(char)c+"\\E]","")))
```
Above lambda can be consumed with Java-8 `Consumer`. It fetches distinct characters and replaces other characters of the String to disassemble each character occurrence.
[Answer]
# [Elixir](http://elixir-lang.org), 70 bytes
```
def f(s), do: '#{s}'|>Enum.group_by(&(&1))|>Map.delete(32)|>Map.values
```
[Answer]
## R, 67 bytes
Even though there's already an R-answer by @Frédéric I thought my solution deserves it's own answer because it's conceptually different.
```
for(i in unique(x<-strsplit(readline(),"")[[1]]))cat(x[x%in%i]," ")
```
The program prints the ascii characters in order of appearence in the string where groups are separated by two white spaces and chars within groups by one white space. A special case is if the string has whitespaces in itself, then at one specific place in the output there will be `4+number of white spaces in string` white spaces separating two groups E.g:
`Ah, abracadabra!` => `A h , a a a a a b b r r c d !`
### Ungolfed
Split up the code for clarity even though assignment is done within the unique functions and changed to order of evaluation:
```
x<-strsplit(readline(),"")[[1]]) # Read string from command line and convert into vector
for(i in unique(x){              # For each unique character of the string, create vector
  cat(x[x%in%i]," ")             # of TRUE/FALSE and return the elements in x for which
}                                # these are matched
```
[Answer]
**C, 178**
```
#define F for
#define i8 char
#define R return
z(i8*r,i8*e,i8*a){i8*b,c;F(;*a;++a)if(!isspace(c=*a)){F(b=a;*b;++b)if(r>=e)R-1;else if(*b==c)*b=' ',*r++=c;*r++='\n';}*r=0;R 0;}
```
z(outputArray,LastPointerOkinOutputarray,inputArray) return -1 on error 0 ok
Note:Modify its input array too...
```
#define P printf
main(){char a[]="A, 12aa99dd333aA,,<<", b[256]; z(b,b+255,a);P("r=%s\n", b);}
/*
 178
 r=AA
 ,,,
 1
 2
 aaa
 99
 dd
 333
 <<
 */
```
[Answer]
## Racket 243 bytes
```
(let*((l(sort(string->list s)char<?))(g(λ(k i)(list-ref k i))))(let loop((i 1)(ol(list(g l 0))))(cond((= i(length l))
(reverse ol))((equal?(g l(- i 1))(g l i))(loop(+ 1 i)(cons(g l i)ol)))(else(loop(+ 1 i)(cons(g l i)(cons #\newline ol)))))))
```
Ungolfed:
```
(define (f s)
  (let*((l (sort (string->list s) char<?))
        (g (λ (k i)(list-ref k i))) )
    (let loop ((i 1)
               (ol (list (g l 0))))
      (cond
        ((= i (length l)) (reverse ol))
        ((equal? (g l (- i 1)) (g l i))
         (loop (+ 1 i) (cons (g l i) ol)))
        (else (loop (+ 1 i) (cons (g l i) (cons #\newline ol))))
        ))))
```
Testing:
```
(display (f "Ah, abracadabra!"))
```
Output:
```
(
 !
 ,
 A
 a a a a a
 b b
 c
 d
 h
 r r)
```
[Answer]
# [Nibbles](http://golfscript.com/nibbles/index.html), 1.5 bytes (3 nibbles)
```
=~|
```
```
=~|     # full program
=~|$$$  # with implicit args added;
  |     # filter
   $    # the input
    $   # by itself (=remove spaces),
=~      # now group the remaining characters by
     $  # themselves
```
[![enter image description here](https://i.stack.imgur.com/wTtS1.png)](https://i.stack.imgur.com/wTtS1.png)
[Answer]
# [Factor](https://factorcode.org), 37 bytes
```
[ " " without [ ] collect-by values ]
```
[Attempt This Online!](https://ato.pxeger.com/run?1=JcwxCsJAEIXhPqd4BuxML7GyEhFEEKuQYhw2JDjZjdlZxbPYpNELeJrcxoVliq-Yn_f-NsTqxmk-XM77464Eee_Ywxv16Fz0Hoxl43EzozWCTZblW_RkVyAMkmSyJCVOkZ4W-SdoU6znZYU83rPT1gVFhRrsRAxrcX3hQRLibJ3iH5NITIaxsxpDQ9ymzzQl_w)
* `" " without` remove spaces
* `[ ] collect-by` group letters by letter
* `values` discard the keys
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 4 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
ðK{γ
```
Outputs as a list.
[Try it online](https://tio.run/##yy9OTMpM/f//8Abv6nOb//93zNBRSEwqSkxOTAFRigA) or [verify all test cases](https://tio.run/##NYsxCgIxEEWv8p06YG@zbG0jWBqL2SSQsJuNJKsS7D2AJxE8gr2H8CIxy2IxvPl/3oTEnTPlkhvC9/4ANbm8n9vb51VEOVBrBbiLrFjPWJEgKcP6PzW28DxWCadhoeKRhw12FX55oL0NV3iDGTmcoQMmyxOm6FQv6m4QRrN0nnuTZjmpaNhLQqrnxE7T8Qc).
`ðK` could alternatively be `ðм` or `#J` for the same byte-count.
**Explanation:**
```
ðK    # Remove all spaces from the (implicit) input-string
  {   # Sort the remaining characters
   γ  # Group adjacent equal characters together in substrings
      # (after which the resulting list is output implicitly)
ðм    # (Vectorized) remove all spaces from the (implicit) input-string
#     # Split the (implicit) input-string by spaces (no-op if the input doesn't contain
      # any spaces)
 J    # Join this list back together to a string (or no-op, by joining the stack
      # consisting of just the single string if the input didn't contained any spaces)
```
[Answer]
# [Bash](https://www.gnu.org/software/bash/) +coreutils, 55 bytes
```
for x in `fold -1|tee a|sort|uniq`;{ grep $x a|rs -g0;}
```
[Try it online!](https://tio.run/##S0oszvj/Py2/SKFCITNPISEtPydFQdewpiQ1VSGxpji/qKSmNC@zMMG6WiG9KLVAQaUCKFxUrKCbbmBd@/@/Y4aOQmJSUWJyYgqIUvwPAA "Bash – Try It Online")
]


[Question]
      [
Tired of always wondering how many more Pokémon you need to catch to get those high-tier evolutions? Wonder no more! Now you will write a complete program or function to calculate it for you!
## The Challenge:
As input, your program will receive a list of the costs in candy to evolve a Pokémon to the next tier. (This list may be separated by any delimiter of your choosing, or as function arguments). Your program will then return or print the number of Pokémon that must be caught, including the one that will be evolved, to evolve through all the tiers given.
How do you calculate this? Like so:
1. Add up all the candy costs: `12 + 50 = 62`
2. Subtract 3 candies from the total, this being from the one Pokémon you keep for evolving: `62 - 3 = 59`
3. Divide this number by 4 (3 for catching, 1 for giving it to the Professor), always taking the `ceil()` of the result: `ceil(59/4) = 15`
4. Finally, add 1 to this total to get the total number of Pokémon you must catch, 16!
Example `Input -> Output`:
```
[4] -> 2
[50] -> 13
[12, 50] -> 16
[25, 100] -> 32
[19, 35, 5, 200] -> 65
```
## Winning:
The app has already taken up most of the space on your phone, so your program needs to be as short as possible. The complete program or function with the smallest byte count will be accepted in two weeks! (with any ties being settled by the earliest submitted entry!)

[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 4 bytes
```
O4÷>
```
**Explanation**
```
O    # sum
 4÷  # integer division by 4
   > # increment
```
[Try it online](http://05ab1e.tryitonline.net/#code=TzTDtz4&input=WzE5LCAzNSwgNSwgMjAwXQ)
[Answer]
# Jelly, ~~5~~ 4 bytes
```
S:4‘
```
[Try it online!](http://jelly.tryitonline.net/#code=Uzo04oCY&input=&args=WzE5LCAzNSwgNSwgMjAwXQ)
`S`um, integer divide `:` by `4` and increment `‘`.
[Answer]
# C# REPL, 15 bytes
```
n=>n.Sum()/4+1;
```
Casts to `Func<IEnumerable<int>, int>`.
[Answer]
## Actually, 4 bytes
```
Σ¼≈u
```
[Try it online!](http://actually.tryitonline.net/#code=zqPCvOKJiHU&input=WzE5LCAzNSwgNSwgMjAwXQ)
Explanation:
```
Σ¼≈u
Σ     sum
 ¼    divide by 4
  ≈   floor
   u  add 1
```
[Answer]
# [Brachylog](http://github.com/JCumin/Brachylog), 5 bytes
```
+:4/+
```
[Try it online!](http://brachylog.tryitonline.net/#code=Kzo0Lys&input=WzE5OjM1OjU6MjAwXQ&args=Wg)
### Explanation
A very original answer…
```
+        Sum
 :4/     Integer division by 4
    +    Increment
```
[Answer]
# BASH (sed + bc) 19
```
sed 's~)~+4)/4~'|bc
```
Input is a `+` separate list on stdin
E.g.:
`echo '(19+35+5+200)'| sed 's~)~+4)/4~'|bc`
[Answer]
# Haskell, 17 bytes
```
(+1).(`div`4).sum
```
[Answer]
## Pyke, 4 bytes
```
seeh
```
[Try it here!](http://pyke.catbus.co.uk/?code=seeh&input=%5B19%2C+35%2C+5%2C+200%5D&warnings=0)
```
((sum(input)/2)/2)+1
```
[Answer]
# Pyth, 5 bytes
```
h/sQ4
```
[Try it here!](http://pyth.herokuapp.com/?code=h%2FsQ4&input=%5B19%2C35%2C5%2C200%5D&debug=0)
Sum input with `sQ`, divide by 4 with `/4` and finally increment `h`.
[Answer]
# CJam, 7 bytes
```
{:+4/)}
```
[Try it here!](http://cjam.tryitonline.net/#code=WzE5IDM1IDUgMjAwXQp7Ois0Lyl9Cgp-cA&input=)
Defines an unnamed block that expects the input on the stack and leaves the result there.
`:+` sums the list, `4/` divides the result by 4 and `)` increments that.
[Answer]
## [Retina](https://github.com/m-ender/retina/), ~~18~~ 17 bytes
Byte count assumes ISO 8859-1 encoding.
```
$
¶4
.+|¶
$*
1111
```
Input is linefeed-separated.
[Try it online!](http://retina.tryitonline.net/#code=JArCtjQKLit8wrYKJCoKMTExMQ&input=MTkKMzUKNQoyMDA)
[Answer]
# R, 22 bytes
```
floor(sum(scan())/4+1)
```
[Answer]
# **JavaScript, 29 Bytes**
```
x=>x.reduce((a,b)=>a+b)/4+1|0
```
[Answer]
# S.I.L.O.S ~~100 99~~ 103 characters + 22 for sample input
Code with testing harness.
```
set 512 52
set 513 10
GOSUB e
GOTO f
funce
a = 0
i = 511
lblE
i + 1
b = get i
a + b
if b E
a / 4
a + 1
return
lblf
printInt a
```
input as a series of set commands to modify the spots of the heap starting at spot 512.
[Try it Online!](http://silos.tryitonline.net/#code=c2V0IDUxMiA1MgpzZXQgNTEzIDEwCkdPU1VCIGUKR09UTyBmCmZ1bmNlCmEgPSAwCmkgPSA1MTEKbGJsRQppICsgMQpiID0gZ2V0IGkKYSArIGIKaWYgYiBFCmEgLyA0CmEgKyAxCnJldHVybgpsYmxmCnByaW50SW50IGE&input=)
]


[Question]
      [
Consider the standard equilateral triangle, with nodes labeled using [barycentric coordinates](https://en.wikipedia.org/wiki/Barycentric_coordinate_system):
![](https://i.stack.imgur.com/URM7b.png)
We can turn this 3 node triangle into a 6 node triangle by adding a new line of 3 vertices (one more than was present on a side of the original 3 node triangle), remove any internal edges (but **not** internal nodes) and re-normalize the coordinates:
[![enter image description here](https://i.stack.imgur.com/cbF99.png)](https://i.stack.imgur.com/cbF99.png)
Repeating the process to go from a 6 node triangle to a 10 node triangle, add a line of 4 vertices (again, one more than was present on a side of the original 6 node triangle), remove any internal edges (but **not** internal nodes) and re-normalize the coordinates:
[![enter image description here](https://i.stack.imgur.com/Ff1Zt.png)](https://i.stack.imgur.com/Ff1Zt.png)
This process can be repeated indefinitely. The goal of this challenge is given an integer `N` representing how many times this process has been performed, output all the nodes for the associated triangle in barycentric coordinates.
# Input
Your program/function should take as input a single non-negative integer `N` representing how many times this process has been applied. Note that for `N=0`, you should output the original triangle with 3 nodes.
The input may come from any source (function parameter, stdio, etc.).
# Output
Your program/function should output all the nodes in normalized barycentric coordinates. The order of the nodes does not matter.
A number can be specified as a fraction (fraction reduction not required) or a floating point number. You may also output "scaled" vectors to specify a node. For example, all 3 of the following outputs are equivalent and allowed:
```
0.5,0.5,0
1/2,2/4,0
[1,1,0]/2
```
If using floating point output, your output should be accurate to within 1%. The output may be to any sink desired (stdio, return value, return parameter, etc.). Note that even though the barycentric coordinates are uniquely determined by only 2 numbers per node, you should output all 3 numbers per node.
# Examples
Example cases are formatted as:
```
N
x0,y0,z0
x1,y1,z1
x2,y2,z2
...
```
where the first line is the input `N`, and all following lines form a node `x,y,z` which should be in the output exactly once. All numbers are given as approximate floating point numbers.
```
0
1,0,0
0,1,0
0,0,1
1
1,0,0
0,1,0
0,0,1
0.5,0,0.5
0.5,0.5,0
0,0.5,0.5
2
1,0,0
0,1,0
0,0,1
0.667,0,0.333
0.667,0.333,0
0.333,0,0.667
0.333,0.333,0.333
0.333,0.667,0
0,0.333,0.667
0,0.667,0.333
3
1,0,0
0.75,0,0.25
0.75,0.25,0
0.5,0,0.5
0.5,0.25,0.25
0.5,0.5,0
0.25,0,0.75
0.25,0.25,0.5
0.25,0.5,0.25
0.25,0.75,0
0,0,1
0,0.25,0.75
0,0.5,0.5
0,0.75,0.25
0,1,0
```
# Scoring
This is code golf; shortest code in bytes wins. Standard loopholes apply. You may use any built-ins desired.

[Answer]
## CJam (22 bytes)
```
{):X),3m*{:+X=},Xdff/}
```
This is an anonymous block (function) which takes `N` on the stack and leaves an array of arrays of doubles on the stack. [Online demo](http://cjam.aditsu.net/#code=2%0A%0A%7B)%3AX)%2C3m*%7B%3A%2BX%3D%7D%2CXdff%2F%7D%0A%0A~%60)
### Dissection
```
{         e# Define a block
  ):X     e# Let X=N+1 be the number of segments per edge
  ),3m*   e# Generate all triplets of integers in [0, X] (inclusive)
  {:+X=}, e# Filter to those triplets which sum to X
  Xdff/   e# Normalise
}
```
[Answer]
# Haskell, 53 bytes
```
f n|m<-n+1=[map(/m)[x,y,m-x-y]|x<-[0..m],y<-[0..m-x]]
```
[Answer]
# Python 3, 87 bytes
This is actually supposed to be a comment to [the solution by TheBikingViking](https://codegolf.stackexchange.com/a/90801/58861) but I don't have enough reputation for comments.
One can save a few bytes by only iterating over the variables `i,j` and using the fact that with the third one they add up to `n+1`.
```
def f(n):d=n+1;r=range(n+2);print([[i/d,j/d,(d-i-j)/d]for i in r for j in r if d>=i+j])
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/), 10 bytes
```
ÌL<¤/3ãDOÏ
```
**Explanation**
```
ÌL<          # range(1,n+2)-1
   ¤/        # divide all by last element (n+1)
     3ã      # cartesian product repeat (generate all possible triples)
       DO    # make a copy and sum the triples
         Ï   # keep triples with sum 1
```
[Try it online](http://05ab1e.tryitonline.net/#code=w4xMPMKkLzPDo0RPw48&input=Mw)
[Answer]
## Mathematica, ~~44~~ 43 bytes
```
Select[Range[0,x=#+1]~Tuples~3/x,Tr@#==1&]&
```
This is an unnamed function taking a single integer argument. Output is a list of lists of exact (reduced) fractions.
Generates all 3-tuples of multiples of `1/(N+1)` between 0 and 1, inclusive, and then selects those whose sum is 1 (as required by barycentric coordinates).
[Answer]
# [MATL](http://github.com/lmendo/MATL), 17 bytes
```
2+:qGQ/3Z^t!s1=Y)
```
[Try it online!](http://matl.tryitonline.net/#code=Mis6cUdRLzNaXnQhczE9WSk&input=Mw)
### Explanation
The approach is the same as in other answers:
1. Generate the array `[0, 1/(n+1), 2/(n+1), ..., 1]`, where `n` is the input;
2. Generate all 3-tuples with those values;
3. Keep only those whose sum is `1`.
More specifically:
```
2+     % Take input and add 2: produces n+2
:q     % Range [0 1 ... n+1]
GQ/    % Divide by n+1 element-wise: gives [0, 1/(n+1), 2/(n+1)..., 1]
3Z^    % Cartesian power with exponent 3. Gives (n+1)^3 × 3 array. Each row is a 3-tuple
t      % Duplicate
!s     % Sum of each row
1=     % Logical index of entries that equal 1
Y)     % Use that index to select rows of the 2D array of 3-tuples
```
[Answer]
## [Jellyfish](https://github.com/iatorm/jellyfish/blob/master/doc.md), ~~37~~ 33 bytes
*Thanks to Zgarb for saving 4 bytes.*
```
p
*%
# S
`
=E   S
`/
1+r#>>i
   3
```
[Try it online!](http://jellyfish.tryitonline.net/#code=cAoqJQojIFMKYAo9RSAgIFMKYC8KMStyIz4-aQogICAz&input=Mg)
Like my Mathematica and Peter's CJam answers, this generates a set of candidate tuples and then selects only those that sum to 1. I'm not entirely happy with the layout yet, and I wonder whether I can save some bytes with hooks or forks, but I'll have to look into that later.
[Answer]
# Perl 6: ~~50~~ 40 bytes
```
{grep *.sum==1,[X] (0,1/($_+1)...1)xx 3}
```
Returns a sequence of 3-element lists of (exact) rational numbers.
Explanation:
* `$_`
Implicitly declared parameter of the lambda.
* `0, 1/($_ + 1) ... 1`
Uses the sequence operator `...` to construct the arithmetic sequence
that corresponds to the possible coordinate values.
* `[X] EXPR xx 3`
Takes the Cartesian product of three copies of EXPR, i.e. generates all possible 3-tuples.
* `grep *.sum == 1, EXPR`
Filter tuples with a sum of 1.
[Answer]
# Ruby, 62
I'd be surprised if this can't be improved on:
```
->x{0.step(1,i=1.0/(x+1)){|a|0.step(1-a,i){|b|p [a,b,1-a-b]}}}
```
Taking the advice latent in the puzzle, this calculates the second node options based on the first, and the third node by subtracting the first two.
[Answer]
# [Brachylog](http://github.com/JCumin/Brachylog), 24 bytes
```
+:1f
yg:2j:eaL+?/g:Lz:*a
```
[Try it online!](http://brachylog.tryitonline.net/#code=KzoxZgp5ZzoyajplYUwrPy9nOkx6Oiph&input=MQ&args=Wg&debug=on)
[Answer]
# Python 3, 106 bytes
```
def f(n):r=range(n+2);print([x for x in[[i/-~n,j/-~n,k/-~n]for i in r for j in r for k in r]if sum(x)==1])
```
A function they takes input via argument and prints a list of lists of floats to STDOUT.
Python is not good at Cartesian products...
**How it works**
```
def f(n):                         Function with input iteration number n
r=range(n+2)                      Define r as the range [0, n+1]
for i in r for j in r for k in r  Length 3 Cartesian product of r
[i/-~n,j/-~n,k/-~n]               Divide each element of each list in the product
                                  by n+1
[x for x in ... if sum(x)==1]     Filter by summation to 1
print(...)                           Print to STDOUT
```
[Try it on Ideone](http://ideone.com/yuki0R)
[Answer]
# [Actually](https://github.com/Mego/Seriously), 15 bytes
This uses an algorithm similar to the one in [TheBikingViking's Python answer](https://codegolf.stackexchange.com/a/90801/47581). Golfing suggestions welcome. [Try it online!](http://actually.tryitonline.net/#code=dTt1cuKZgC8zQOKImWDOozE9YOKWkQ&input=Mw)
```
u;ur♀/3@∙`Σ1=`░
```
**Ungolfed:**
```
u;                Increment implicit input and duplicate.
  ur              Range [0..n+1]
    ♀/            Divide everything in range by (input+1).
      3@∙         Take the Cartesian product of 3 copies of [range divided by input+1]
         `Σ1=`    Create function that takes a list checks if sum(list) == 1.
              ░   Push values of the Cartesian product where f returns a truthy value.
```
[Answer]
# Ruby, ~~77~~ 74 bytes
Another answer using the algorithm in [TheBikingViking's Python answer](https://codegolf.stackexchange.com/a/90801/47581). Golfing suggestions welcome.
```
->n{a=[*0.step(1,i=1.0/(n+1))];a.product(a,a).reject{|j|j.reduce(&:+)!=1}}
```
Another 74-byte algorithm based on [Not that Charles's Ruby answer](https://codegolf.stackexchange.com/a/90828/47581).
```
->x{y=x+1;z=1.0/y;[*0..y].map{|a|[*0..y-a].map{|b|p [a*z,b*z,(y-a-b)*z]}}}
```
[Answer]
## JavaScript (Firefox 30-57), ~~88~~ 81 bytes
```
n=>[for(x of a=[...Array(++n+1).keys()])for(y of a)if(x+y<=n)[x/n,y/n,(n-x-y)/n]]
```
Returns an array of arrays of floating-point numbers. Edit: Saved 7 bytes by computing the third coordinate directly. I tried eliminating the `if` by calculating the range of `y` directly but it cost an extra byte:
```
n=>[for(x of a=[...Array(++n+1).keys()])for(y of a.slice(x))[x/n,(y-x)/n,(n-y)/n]]
```
]


[Question]
      [
Here's a nice easy challenge:
>
> Given a string that represents a number in an unknown base, determine the lowest possible base that number might be in. The string will only contain `0-9, a-z`. If you like, you may choose to take uppercase letters instead of lowercase, but please specify this. You must output this lowest possible base in decimal.
>
>
>
Here is a more concrete example. If the input string was "01234", it is impossible for this number to be in binary, since 2, 3, and 4 are all undefined in binary. Similarly, this number cannot be in base 3, or base 4. Therefore, this number *must* be in base-5, or a higher base, so you should output '5'.
Your code must work for any base between base 1 (unary, all '0's) and base 36 ('0-9' and 'a-z').
You may take input and provide output in any reasonable format. Base-conversion builtins are allowed. As usual, standard loopholes apply, and the shortest answer in bytes is the winner!
# Test IO:
```
#Input          #Output
00000       --> 1
123456      --> 7
ff          --> 16
4815162342  --> 9
42          --> 5
codegolf    --> 25
0123456789abcdefghijklmnopqrstuvwxyz    --> 36
```

[Answer]
# Perl, ~~30~~ 27 bytes
Includes +1 for `-p`
Run with the input on STDIN, e.g.
```
base.pl <<< codegolf
```
`base.pl`:
```
#!/usr/bin/perl -p
\@F[unpack"W*"];$_=@F%39-9
```
[Answer]
## LiveScript, 32 bytes
```
->1+parseInt (it/'')sort!pop!,36
```
A port of [this answer](https://codegolf.stackexchange.com/a/90745) in my favorite language that compile to JavaScript. If `base~number` operator worked with variables I could write `->1+36~(it/'')sort!pop!` (23 bytes), but it conflicts with the function bind operator :/
[Answer]
# PowerShell full program, 56 62 bytes
lowercase letters required.
```
([int]((read-host).ToCharArray()|sort|select -l 1)-8)%39
```
[Answer]
# R, 59 57 bytes
Thanks to @Andreï-Kostyrka for two bytes.
```
max(which(c(0:9,letters)%in%strsplit(scan(,""),"")[[1]]))
```
`scan(,'')` takes the input and coerces it to a string. Then `strsplit` divides it into its individual characters. `[[1]]` is because that returns a list. `%in%` then checks which of the vector `0,1,2,...,8,9,a,b,c,...,x,y,z` is in the input. which tells us the place in that vector of items in the input -- and `max` finds the biggest place -- which corresponds to the base.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 3 bytes
```
Hà>
```
[Try it online](https://tio.run/##yy9OTMpM/f/f4/ACu///o5WSlXQUlPJBRAqISAUR6XCxHBCRphQLAA "05AB1E – Try It Online") or [validate all test cases](https://tio.run/##bc5JDoJAEIXhvacgvYYEcEA3sDHGeAXCAhAUJ1ScT@NdPFjrD0kRo5svL13VVVVWcVJk2puMZ4EyLMs3VKCnr6evTR0qW5nGL1EnVA7RhS70oA@DupwT8zrWpSE40uQ0nb8j3PZLE1NiCXPIYCFvm3aNLXP/X/XBk0tGEEMC6ff8XJYsoYAVrGXnFnZyxx4OcIQKTnCGC1zhBnd4qOgN).
Explanation:
```
          # implicit input
H         # convert each digit to decimal
 à        # maximum
  >       # add 1
          # implicit output
```
[Answer]
# [Thunno 2](https://github.com/Thunno/Thunno2) `G`, 4 [bytes](https://github.com/Thunno/Thunno2/blob/main/docs/codepage.md)
```
36b⁺
```
[Try it online!](https://Not-Thonnu.github.io/run#aGVhZGVyPVJkJmNvZGU9MzZiJUUyJTgxJUJBJmZvb3Rlcj0maW5wdXQ9JTIyMDAwMDAlMjIlMjAlMjAlMjAlMjAlMjAlMjAlMjAtJTNFJTIwMSUwQSUyMjEyMzQ1NiUyMiUyMCUyMCUyMCUyMCUyMCUyMC0lM0UlMjA3JTBBJTIyZmYlMjIlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAtJTNFJTIwMTYlMEElMjI0ODE1MTYyMzQyJTIyJTIwJTIwLSUzRSUyMDklMEElMjI0MiUyMiUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC0lM0UlMjA1JTBBJTIyY29kZWdvbGYlMjIlMjAlMjAlMjAlMjAtJTNFJTIwMjUlMEElMjIwMTIzNDU2Nzg5YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXolMjIlMjAlMjAlMjAlMjAtJTNFJTIwMzYmZmxhZ3M9Q0c=)
Takes input in uppercase.
#### Explanation
```
36b⁺  # Implicit input
36b   # Convert each character from base-36
   ⁺  # Increment each integer
      # Implicit output of maximum
```
]