问:
Print numbers from 1 to 10
This might be a very simple challenge, but I am surprised it hasn't been done on code-golf yet:

Print all Integers from 1 to 10 inclusive in ascending order to standard output.

Your output format can be whatever your language supports. This includes arbitrary separators (commas, semicolons, newlines, combinations of those, etc., but no digits), and prefixes and postfixes (like [...]). However, you may not output any other numbers than 1 through 10. Your program may not take any input. Standard loopholes are disallowed.

This is code-golf, so shortest answer in bytes wins!

Leaderboard

var QUESTION_ID=86075,OVERRIDE_USER=42570;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="
"+e.body.replace(OVERRIDE_REG,"")+"
")});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;/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;```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}</code>```

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

```

答:
Morse code, 65 bytes

```<code>.---- ..--- ...-- ....- ..... -.... --... ---.. ----. .----- ----
</code>```

Copy and paste here to try it out (and listen to the code): http://morsecode.scphillips.com/translator.html

Title: Print numbers from 1 to 10

Body:
Morse code, 65 bytes

.---- ..--- ...-- ....- ..... -.... --... ---.. ----. .----- ----

Copy and paste here to try it out (and listen to the code): http://morsecode.scphillips.com/translator.html


问:
Help: Aliens Programmers only speak ASCII

Setting the Scene:

It is an average afternoon, as you unwind after a long day by engaging in your favorite pastime: answering the plethora of captivating questions on PPCG. It hasn't been a good day for you; those damned Pyth programmers keep getting best answer and it's killing your vibe. Suddenly, you notice a new question has been posted! You make up your mind; not this time CJammers. Furiously, you begin to type, birthing a stream of characters; a fetus of the glorious BrainFuck loop that your end product will be. You type and type. Faster! Faster still! You're so focused you don't even notice the lights on your screen start to flicker on and off. Suddenly, the monitor glows green, an alien like symbol branded upon the desktop. Using your impeccable skills you cat ~/Desktop/aliensymbol and get presented with a bunch of numbers, a message! Being the shrewd PPCG programmer that you are, you notice that it looks like ASCII. No matter for you, you print(chr(i) for i in file) and decipher the message. Your first thought: "I need to share this with the community!".

...

Who would've thought it? That the first people to make contact with aliens would be the humble programmers of PPCG. Why us? Maybe it is because we are the epitome of human intelligence. Or maybe because BrainFuck is about as close as we have to an alien language. Nevertheless, the aliens - being the ultra-intelligent life forms that they are - want to test whether they should classify the human race as  intelligent or not. As a test of our mental prowess, the aliens have asked us to send them a few computer programs to demonstrate that we are technologically cultured. The issue is, the only human language they understand is numerical ASCII!

Help humankind show those creatures who the real intellectual alpha is. We need to send them a script that will convert our text based source codes into their numerical ASCII versions. Unfortunately, due to our underdeveloped technology (thanks Obama), we must send as small a translating program as possible. Good thing they chose to contact PPCG!

The Challenge:

The premise of this challenge is simple: you are to write a program that will take any program's source code (or any general text file for that matter), and output a space separated version of it with an ASCII translation below each line. That is, given an input of a text file, you need to output each line of that file followed by a line containing the ASCII representation of each character in the line above it (with each number lining up with the character it represents).

An example will greatly clarify this. Taking the source code of the infamous hello world as the input:

```<code>#include <stdio.h>

int main() {
    printf("hello, world\n");
    return 0;
}
</code>```

your program should output:

```<code>#   i   n   c   l   u   d   e       <   s   t   d   i   o   .   h   >
35  105 110 99  108 117 100 101 32  60  115 116 100 105 111 46  104 62  10

10
i   n   t       m   a   i   n   (   )       {
105 110 116 32  109 97  105 110 40  41  32  123 10
                p   r   i   n   t   f   (   "   h   e   l   l   o   ,       w   o   r   l   d   \   n   "   )   ;
32  32  32  32  112 114 105 110 116 102 40  34  104 101 108 108 111 44  32  119 111 114 108 100 92  110 34  41  59  10
                r   e   t   u   r   n       0   ;
32  32  32  32  114 101 116 117 114 110 32  48  59  10
}
125 10
</code>```

Implementation Details:

You may choose to take the input in whatever form you wish (opening file, command line pipe, function parameter etc.) and you should output to stdout or return the output from a function.

Things to note

Each character in the output is separated by a '\t' to allow for the space of 3 digits in the line below to line up (we are going to assume your tab is set to 4 spaces or more).

The newlines are displayed on the line that the return key was pressed (notice the 10's in the example)

The '\t' and '\n' printing requirements are lax. Your output must, in the general sense, look pleasing to the eye (need to show those aliens we have aesthetic sense as well), and if you can bend the previous two points while maintaining visual integrity, you will be forgiven.

You can choose to assume whether or not there is a newline at the end of the last line.

Scoring

This is code-golf so shortest program wins. Note, even if your program isn't the shortest, but uses really neat tricks relative to the language you are using, many +1's to you!

Good luck. The intergalactic intelligence ranking of humanity rests on your shoulders.

Note: Please forgive the plot holes. I'm not a writer :D

答:
Java, 202 bytes

```<code>s->{for(String g : s.split("\n")){g.chars().forEach(c->System.out.print((char)c+"   "));System.out.println();g.chars().forEach(c->System.out.print(c+(c<10?"  ":c<100?"  ":" ")));System.out.println();}};
</code>```

I can't even be bothered making this shorter..

ContentLicense: CC BY-SA 3.0

Body:
Java, 202 bytes

s->{for(String g : s.split("\n")){g.chars().forEach(c->System.out.print((char)c+"   "));System.out.println();g.chars().forEach(c->System.out.print(c+(c<10?"  ":c<100?"  ":" ")));System.out.println();}};

I can't even be bothered making this shorter..


问:
Outputting x to y

Challenge

You must choose one number x (y = x + 9) and create ten unique programs which each print out one of the numbers in the range x to y inclusive. However, there are three twists:

Each program's score is the difference between length of your program in bytes and n (where n is the number that the program outputs). i.e. If a program is 12 bytes long and it outputs the number 15, its score is 3 (|15-12| = 3).

You must not use comments to achieve this byte count.

Your program must not contain any number which is contained within the number which the program outputs. i.e. If a program outputs 1659, the program cannot contain 1, 6, 5 or 9

Your program must not contain any of the characters which are the first letters of the number which the program outpts. i.e. If the program outputs 1659, the program cannot contain o, s, f or n (one, six, five and nine)

Rules

If any number is impossible, this is counted as a DNP. You should declare all DNPs in your range.

The following is a list of numbers and their spellings. The disallowed characters for each are highlighted in bold:

0: Zero

1: One

2: Two

3: Three

4: Four

5: Five

6: Six

7: Seven

8: Eight

9: Nine

Scoring

Your overall score is the sum of all your programs' scores.

Winning

The person with the lowest score with the fewest DNPs wins.

In the event of a tie, the person whose last edit was earliest wins.

Title: Outputting x to y

Body:
PHP 7 , x=4,score=0

2+2;
11-6;
18-12;
3+2**2;
2+2+2+2;
3+2**2+2;
2+2+2+2+2;
3+2**2+2+2;
3*3+3+6-3-3;
4**2-5+2+0*2;


答:
Python 3, <s>92 97</s> 107 bytes

<s>
    for i in list(open(input()).read().split("\n")):
        for j in i: print(i+"\n"+ord(j))
</s>

```<code>p=print
for i in list(open(input()).read().split("\n"))
    s=t=''
    for j in i:
        r=str(ord(j))
        s+=j+' '*len(r)
        t+=r+' '
    p(s)
    p(t)
</code>```

This is untested, but should work.

Thanks @gowrath for pointing out that the code isn't doing as the question specifies.

Title: Help: Aliens Programmers only speak ASCII

Body:
Setting the Scene:

It is an average afternoon, as you unwind after a long day by engaging in your favorite pastime: answering the plethora of captivating questions on PPCG. It hasn't been a good day for you; those damned Pyth programmers keep getting best answer and it's killing your vibe. Suddenly, you notice a new question has been posted! You make up your mind; not this time CJammers. Furiously, you begin to type, birthing a stream of characters; a fetus of the glorious BrainFuck loop that your end product will be. You type and type. Faster! Faster still! You're so focused you don't even notice the lights on your screen start to flicker on and off. Suddenly, the monitor glows green, an alien like symbol branded upon the desktop. Using your impeccable skills you cat ~/Desktop/aliensymbol and get presented with a bunch of numbers, a message! Being the shrewd PPCG programmer that you are, you notice that it looks like ASCII. No matter for you, you print(chr(i) for i in file) and decipher the message. Your first thought: "I need to share this with the community!".

...

Who would've thought it? That the first people to make contact with aliens would be the humble programmers of PPCG. Why us? Maybe it is because we are the epitome of human intelligence. Or maybe because BrainFuck is about as close as we have to an alien language. Nevertheless, the aliens - being the ultra-intelligent life forms that they are - want to test whether they should classify the human race as  intelligent or not. As a test of our mental prowess, the aliens have asked us to send them a few computer programs to demonstrate that we are technologically cultured. The issue is, the only human language they understand is numerical ASCII!

Help humankind show those creatures who the real intellectual alpha is. We need to send them a script that will convert our text based source codes into their numerical ASCII versions. Unfortunately, due to our underdeveloped technology (thanks Obama), we must send as small a translating program as possible. Good thing they chose to contact PPCG!

The Challenge:

The premise of this challenge is simple: you are to write a program that will take any program's source code (or any general text file for that matter), and output a space separated version of it with an ASCII translation below each line. That is, given an input of a text file, you need to output each line of that file followed by a line containing the ASCII representation of each character in the line above it (with each number lining up with the character it represents).

An example will greatly clarify this. Taking the source code of the infamous hello world as the input:

```<code>#include <stdio.h>

int main() {
    printf("hello, world\n");
    return 0;
}
</code>```

your program should output:

```<code>#   i   n   c   l   u   d   e       <   s   t   d   i   o   .   h   >
35  105 110 99  108 117 100 101 32  60  115 116 100 105 111 46  104 62  10

10
i   n   t       m   a   i   n   (   )       {
105 110 116 32  109 97  105 110 40  41  32  123 10
                p   r   i   n   t   f   (   "   h   e   l   l   o   ,       w   o   r   l   d   \   n   "   )   ;
32  32  32  32  112 114 105 110 116 102 40  34  104 101 108 108 111 44  32  119 111 114 108 100 92  110 34  41  59  10
                r   e   t   u   r   n       0   ;
32  32  32  32  114 101 116 117 114 110 32  48  59  10
}
125 10
</code>```

Implementation Details:

You may choose to take the input in whatever form you wish (opening file, command line pipe, function parameter etc.) and you should output to stdout or return the output from a function.

Things to note

Each character in the output is separated by a '\t' to allow for the space of 3 digits in the line below to line up (we are going to assume your tab is set to 4 spaces or more).

The newlines are displayed on the line that the return key was pressed (notice the 10's in the example)

The '\t' and '\n' printing requirements are lax. Your output must, in the general sense, look pleasing to the eye (need to show those aliens we have aesthetic sense as well), and if you can bend the previous two points while maintaining visual integrity, you will be forgiven.

You can choose to assume whether or not there is a newline at the end of the last line.

Scoring

This is code-golf so shortest program wins. Note, even if your program isn't the shortest, but uses really neat tricks relative to the language you are using, many +1's to you!

Good luck. The intergalactic intelligence ranking of humanity rests on your shoulders.

Note: Please forgive the plot holes. I'm not a writer :D

Body:
Python 3, <s>92 97</s> 107 bytes

<s>
    for i in list(open(input()).read().split("\n")):
        for j in i: print(i+"\n"+ord(j))
</s>

p=print
for i in list(open(input()).read().split("\n"))
    s=t=''
    for j in i:
        r=str(ord(j))
        s+=j+' '*len(r)
        t+=r+' '
    p(s)
    p(t)

This is untested, but should work.

Thanks @gowrath for pointing out that the code isn't doing as the question specifies.


问:
Convert to Bibi-binary
Bibi-binary is a numeric system invented by Boby Lapointe in order to represent numbers in letters which pronunciation seems funny.

Your task is to convert decimal numbers into Bibi-binary!

Conversion

A number is converted to base 16 (hexadecimal) and each character is replaced by its Bibi-binary name:

```<code>0 = HO
1 = HA
2 = HE
3 = HI
4 = BO
5 = BA
6 = BE
7 = BI
8 = KO
9 = KA
A = KE
B = KI
C = DO
D = DA
E = DE
F = DI
</code>```

Let N be a positive integer (between 1 -> 2^31-1).
For every character in the hexadecimal representation of N, replace the character by its according Bibi-binary pair (the table above contains all the pairs).

Example

N = 156

H = (hexadecimal representation of N) --> 9C

9 --> KA, C --> DO

Thus the output is KADO.

Input & output

You will receive an positive 32-bit integer N, which you will have to turn into Bibi-binary.

You may (return, print, etc...) in any convenient format, but the pairs have to be connected! So KA DO wouldn't be okay, but KADO would.

Both, lowercase and uppercase are allowed.

Rules

No loopholes.

This is code-golf, so the shortest code wins.

Testcases

```<code>2048 -> KOHOHO
156 -> KADO
10000 -> HEBIHAHO
12 -> DO
</code>```

答:
Python 2, <s>81</s> 76 bytes

lambda n:''.join('HBKD'[int(x,16)/4]+'OAEI'[int(x,16)%4]for x in hex(n)[2:])
```

Chooses the bibi-digit to represent each hex digit based on the patterns in the bibi-digits.

Title: Convert to Bibi-binary

Body:
Python 2, <s>81</s> 76 bytes

lambda n:''.join('HBKD'[int(x,16)/4]+'OAEI'[int(x,16)%4]for x in hex(n)[2:])

Chooses the bibi-digit to represent each hex digit based on the patterns in the bibi-digits.


答:
05AB1E, <s>20</s> <s>18</s> 16 bytes

```<code>hv…Ã‚kdžM¨ÁâyHèJ
</code>```

Explanation

```<code>h                     # convert input to hex
 v                    # for each
  …Ã‚kd               # string of the possible first Bibi-binary letters
       žM¨Á           # string of the possible second Bibi-binary letters
           â          # cartesian product to produce list of Bibi-binary pairs
            yH        # convert hex char to base 10
              è       # use this to index into the list
               J      # join
</code>```

Try it online!

Saved 2 bytes thanks to Adnan

Title: Convert to Bibi-binary

Body:
Bibi-binary is a numeric system invented by Boby Lapointe in order to represent numbers in letters which pronunciation seems funny.

Your task is to convert decimal numbers into Bibi-binary!

Conversion

A number is converted to base 16 (hexadecimal) and each character is replaced by its Bibi-binary name:

```<code>0 = HO
1 = HA
2 = HE
3 = HI
4 = BO
5 = BA
6 = BE
7 = BI
8 = KO
9 = KA
A = KE
B = KI
C = DO
D = DA
E = DE
F = DI
</code>```

Let N be a positive integer (between 1 -> 2^31-1).
For every character in the hexadecimal representation of N, replace the character by its according Bibi-binary pair (the table above contains all the pairs).

Example

N = 156

H = (hexadecimal representation of N) --> 9C

9 --> KA, C --> DO

Thus the output is KADO.

Input & output

You will receive an positive 32-bit integer N, which you will have to turn into Bibi-binary.

You may (return, print, etc...) in any convenient format, but the pairs have to be connected! So KA DO wouldn't be okay, but KADO would.

Both, lowercase and uppercase are allowed.

Rules

No loopholes.

This is code-golf, so the shortest code wins.

Testcases

```<code>2048 -> KOHOHO
156 -> KADO
10000 -> HEBIHAHO
12 -> DO
</code>```

Body:
05AB1E, <s>20</s> <s>18</s> 16 bytes

hv…Ã‚kdžM¨ÁâyHèJ

Explanation

h                     # convert input to hex
 v                    # for each
  …Ã‚kd               # string of the possible first Bibi-binary letters
       žM¨Á           # string of the possible second Bibi-binary letters
           â          # cartesian product to produce list of Bibi-binary pairs
            yH        # convert hex char to base 10
              è       # use this to index into the list
               J      # join

Try it online!

Saved 2 bytes thanks to Adnan


答:
Python 2, 58 bytes

f=lambda n:(n>15and f(n/16)or"")+"HBKD"[n/4%4]+"OAEI"[n%4]
```

A recursive solution. Try it on Ideone.

Title: Convert to Bibi-binary

Body:
Python 2, 58 bytes

f=lambda n:(n>15and f(n/16)or"")+"HBKD"[n/4%4]+"OAEI"[n%4]

A recursive solution. Try it on Ideone.


答:
Pyth, 28 bytes

```<code>L+?>b15y/b16k@*"HBKD""OAEI"b
</code>```

Defines a function y. Basically the same algorithm as my Python answer.

Explanation:

```<code>L                            # Define a function, y, with an argument, b.
  ?>b15                      # If b > 15, then:
       y/b16                 # Call y with b / 16, else:
            k                # The empty string.
 +                           # Append with
              *"HBKD""OAEI"  # The Cartesian product of "HBKD" and "OAEI". Gives all the letter pairs in order
             @             b # Get the b'th number from that list. Because @ in Pyth is modular, we don't need to take b % 16.
</code>```

Try it here! (The extra two chars at the end is just to call the function)

Title: Convert to Bibi-binary

Body:
Pyth, 28 bytes

L+?>b15y/b16k@*"HBKD""OAEI"b

Defines a function y. Basically the same algorithm as my Python answer.

Explanation:

L                            # Define a function, y, with an argument, b.
  ?>b15                      # If b > 15, then:
       y/b16                 # Call y with b / 16, else:
            k                # The empty string.
 +                           # Append with
              *"HBKD""OAEI"  # The Cartesian product of "HBKD" and "OAEI". Gives all the letter pairs in order
             @             b # Get the b'th number from that list. Because @ in Pyth is modular, we don't need to take b % 16.

Try it here! (The extra two chars at the end is just to call the function)


答:
Ru, score = 0

x = 2

```<code>’1
’’1
’’’1
’’’’1
’’’’’1
’’’’’’1
’’’’’’’1
’’’’’’’’1
→’’’’’’’’2
→’’’’’’’’’2
</code>```

Title: Outputting x to y

Body:
Challenge

You must choose one number x (y = x + 9) and create ten unique programs which each print out one of the numbers in the range x to y inclusive. However, there are three twists:

Each program's score is the difference between length of your program in bytes and n (where n is the number that the program outputs). i.e. If a program is 12 bytes long and it outputs the number 15, its score is 3 (|15-12| = 3).

You must not use comments to achieve this byte count.

Your program must not contain any number which is contained within the number which the program outputs. i.e. If a program outputs 1659, the program cannot contain 1, 6, 5 or 9

Your program must not contain any of the characters which are the first letters of the number which the program outpts. i.e. If the program outputs 1659, the program cannot contain o, s, f or n (one, six, five and nine)

Rules

If any number is impossible, this is counted as a DNP. You should declare all DNPs in your range.

The following is a list of numbers and their spellings. The disallowed characters for each are highlighted in bold:

0: Zero

1: One

2: Two

3: Three

4: Four

5: Five

6: Six

7: Seven

8: Eight

9: Nine

Scoring

Your overall score is the sum of all your programs' scores.

Winning

The person with the lowest score with the fewest DNPs wins.

In the event of a tie, the person whose last edit was earliest wins.

Body:
Ru, score = 0

x = 2

’1
’’1
’’’1
’’’’1
’’’’’1
’’’’’’1
’’’’’’’1
’’’’’’’’1
→’’’’’’’’2
→’’’’’’’’’2


问:
Find every digit from the largest column
Here's a relatively simple challenge for you:

Given a list of positive integers:

Line them up in a grid, and sum each column. For example, if the input was [123, 7, 49, 681], the grid would look like this:

```<code> 1  2  3
 7
 4  9
 6  8  1
</code>```

And the sum of each column would be [18, 19, 4]:

```<code> 1  2  3
 7
 4  9
 6  8  1
 --------
 18 19 4
</code>```

Find the maximum of these sums, which in this case would be 19, and then

Output every digit that is at the same index as this maximum column. In this case, that would be

```<code>2
9
8
</code>```

You do not have to output these numbers in any particular order.
Note that there are only three outputs, even though we had 4 inputs. In the case of a tie, pick the earliest index. For example, if the input was [25, 223, 302], your grid is:

```<code>2  5
2  2  3
3  0  2
-------
7  7  5
</code>```

You should output

```<code>2
2
3
</code>```

You can print these numbers in any format you like. List format, newline separated, space separated, etc. You may not take the input as a 2D array of digits, e.g.

```<code>[[1, 2, 3],
[7],
[4, 9],
[6, 8, 1]
</code>```

But other than that, you can take input as a list of strings, a list of digits, or any other reasonable format.

You may also assume that all inputs will be valid and contain at least two numbers.

As usual, the shortest answer in bytes wins!

Test IO:

```<code>#Input                      #Output
[1, 11, 111, 1111]      --> [1, 1, 1, 1]
[1, 12, 123]            --> [2, 2]
[987654321, 111]        --> [9, 1]
[111, 123456789]        --> [9]
[4, 8, 15, 16, 23, 42]  --> [4, 8, 1, 1, 2, 4]
[4, 8, 12, 26, 27, 38]  --> [2, 6, 7, 8]
[24, 53]                --> [2, 5]
[12, 304, 506]          --> [4, 6]
[30, 285, 121]          --> [0, 8, 2]
</code>```

Body:
Javascript (ES6), <s>108</s> <s>103</s> 100 bytes

It's a bit verbose and could probably be golfed some more with a different approach. I wish I could get rid of this .filter(n=>n).

Saved 5 bytes thanks to Neil

Saved 3 bytes thanks to edc65

l=>l.map(n=>[...n].map((d,x)=>(m=(s[x]=(s[x]|0)-d)<m?s[c=x]:m,d)),s=[m=0]).map(n=>n[c]).filter(n=>n)

Demo

let f =
l=>l.map(n=>[...n].map((d,x)=>(m=(s[x]=(s[x]|0)-d)<m?s[c=x]:m,d)),s=[m=0]).map(n=>n[c]).filter(n=>n)

console.log(f(["1", "11", "111", "1111"]).join`,`);          // --> [1, 1, 1, 1]
console.log(f(["1", "12", "123"]).join`,`);                  // --> [2, 2]
console.log(f(["987654321", "111"]).join`,`);                // --> [9, 1]
console.log(f(["111", "123456789"]).join`,`);                // --> [9]
console.log(f(["4", "8", "15", "16", "23", "42"]).join`,`);  // --> [4, 8, 1, 1, 2, 4]
console.log(f(["4", "8", "12", "26", "27", "38"]).join`,`);  // --> [2, 6, 7, 8]
console.log(f(["24", "53"]).join`,`);                        // --> [2, 5]
console.log(f(["12", "304", "506"]).join`,`);                // --> [4, 6]
console.log(f(["30", "285", "121"]).join`,`);                // --> [0, 8, 2]


问:
Rolling three dice and show the probabilities
Roll 3 dice, count the two highest two values and add them to the result. Every 1 must be rolled once again.

Now show the average throw after 1000000 tries and the probabilities for each result occurring:

Desired Result:

avg(9.095855)

  2: 0.0023

  3: 0.0448

  4: 1.1075

  5: 2.8983

  6: 6.116

  7: 10.1234

  8: 15.4687

  9: 18.9496

  10: 19.3575

  11: 16.0886

  12: 9.8433

答:
LUA (307)

```<code>function r()
  m=math.random(1,6)
  if(m==1)then return math.random(1,6)end
  return m
end
e={}
s=0
o=1000000
for i=2,12 do e[i]=0 end
for t=1,o do
  d={}
  for i=1,3 do d[i]=r() end
  table.sort(d)
  x=d[2]+d[3]
  e[x]=e[x]+1
  s=s+x
end
print("avg("..s/o..")")
for i=2,12 do print(i..": "..e[i]/o*100) end
</code>```

My first one ;)

Body:
LUA (307)

function r()
  m=math.random(1,6)
  if(m==1)then return math.random(1,6)end
  return m
end
e={}
s=0
o=1000000
for i=2,12 do e[i]=0 end
for t=1,o do
  d={}
  for i=1,3 do d[i]=r() end
  table.sort(d)
  x=d[2]+d[3]
  e[x]=e[x]+1
  s=s+x
end
print("avg("..s/o..")")
for i=2,12 do print(i..": "..e[i]/o*100) end

My first one ;)


答:
Jelly, score 0

x=3, using ten completely different methods

```<code>2ÆN          -  3: second prime
6ḃ2S         -  4: sum of digits of 6 in bijective-base 2
2*4BL        -  5: number of bits in 16
2+1R+/       -  6: third triangle number
⁵×ØeḞDṪ      -  7: 1st decimal place of Euler's number
12,6_/+2     -  8: Number of vertices on a cube
ȷ*4×ØPḞDṪ    -  9: the 12th decimal place of pi
9999b9999Ḍ   - 10: decimal of 9999 base 9999
45683g38654  - 11: greatest common divisor of 45683 and its reverse
6RLRL×7RLÆfS - 12: sum of the prime factors of 42 (6*7 is the ultimate question)
</code>```

Run all ten at TryItOnline

Previous (just another boring answer)

x=2

```<code>1‘          - 1 incremented            1+1 =  2
1‘‘         - 1 incremented twice    1+1+1 =  3
1‘‘‘        - 1 incremented thrice 1+1+1+1 =  4
1‘‘‘‘       -                ... 1+1+1+1+1 =  5
1‘‘‘‘‘      -              ... 1+1+1+1+1+1 =  6
1‘‘‘‘‘‘     -            ... 1+1+1+1+1+1+1 =  7
1‘‘‘‘‘‘‘    -          ... 1+1+1+1+1+1+1+1 =  8
1‘‘‘‘‘‘‘    -        ... 1+1+1+1+1+1+1+1+1 =  9
3‘‘‘‘‘‘‘‘’  - 3 incremented eight times then decremented
                       3+1+1+1+1+1+1+1+1-1 = 10
3‘‘‘‘‘‘‘‘‘’ - 3 incremented nine times then decremented
                     3+1+1+1+1+1+1+1+1+1-1 = 11
</code>```

If tie-break is on lowest x then for x=0

```<code>          - 0: empty program returns zero
¬         - 1: logical not
¬‘        - 2: logical not then increment
¬‘‘       - 3: logical not then increment twice
¬‘‘‘      - 4: logical not then increment thrice
¬‘‘‘‘     - 5: logical not then increment four times
¬‘‘‘‘‘    - 6: logical not then increment five times
¬‘‘‘‘‘‘   - 7: logical not then increment six times
¬‘‘‘‘‘‘‘  - 8: logical not then increment seven times
¬‘‘‘‘‘‘‘‘ - 9: logical not then increment eight times
</code>```

Run all ten at TryItOnline

Title: Outputting x to y

Body:
Jelly, score 0

x=3, using ten completely different methods

2ÆN          -  3: second prime
6ḃ2S         -  4: sum of digits of 6 in bijective-base 2
2*4BL        -  5: number of bits in 16
2+1R+/       -  6: third triangle number
⁵×ØeḞDṪ      -  7: 1st decimal place of Euler's number
12,6_/+2     -  8: Number of vertices on a cube
ȷ*4×ØPḞDṪ    -  9: the 12th decimal place of pi
9999b9999Ḍ   - 10: decimal of 9999 base 9999
45683g38654  - 11: greatest common divisor of 45683 and its reverse
6RLRL×7RLÆfS - 12: sum of the prime factors of 42 (6*7 is the ultimate question)

Run all ten at TryItOnline

Previous (just another boring answer)

x=2

1‘          - 1 incremented            1+1 =  2
1‘‘         - 1 incremented twice    1+1+1 =  3
1‘‘‘        - 1 incremented thrice 1+1+1+1 =  4
1‘‘‘‘       -                ... 1+1+1+1+1 =  5
1‘‘‘‘‘      -              ... 1+1+1+1+1+1 =  6
1‘‘‘‘‘‘     -            ... 1+1+1+1+1+1+1 =  7
1‘‘‘‘‘‘‘    -          ... 1+1+1+1+1+1+1+1 =  8
1‘‘‘‘‘‘‘    -        ... 1+1+1+1+1+1+1+1+1 =  9
3‘‘‘‘‘‘‘‘’  - 3 incremented eight times then decremented
                       3+1+1+1+1+1+1+1+1-1 = 10
3‘‘‘‘‘‘‘‘‘’ - 3 incremented nine times then decremented
                     3+1+1+1+1+1+1+1+1+1-1 = 11

If tie-break is on lowest x then for x=0

          - 0: empty program returns zero
¬         - 1: logical not
¬‘        - 2: logical not then increment
¬‘‘       - 3: logical not then increment twice
¬‘‘‘      - 4: logical not then increment thrice
¬‘‘‘‘     - 5: logical not then increment four times
¬‘‘‘‘‘    - 6: logical not then increment five times
¬‘‘‘‘‘‘   - 7: logical not then increment six times
¬‘‘‘‘‘‘‘  - 8: logical not then increment seven times
¬‘‘‘‘‘‘‘‘ - 9: logical not then increment eight times

Run all ten at TryItOnline


答:
Javascript (ES6), <s>58</s> <s>53</s> 43 bytes

```<code>f=n=>n?f(n>>4)+'HBKD'[n/4&3]+'OAEI'[n&3]:''
</code>```

Saved 10 bytes (no support for n = 0 anymore)

Demo

var f=n=>n?f(n>>4)+'HBKD'[n/4&3]+'OAEI'[n&3]:''

console.log(f(2048));   // -> KOHOHO
console.log(f(156));    // -> KADO
console.log(f(10000));  // -> HEBIHAHO
console.log(f(12));     // -> DO```

Title: Convert to Bibi-binary

Body:
Javascript (ES6), <s>58</s> <s>53</s> 43 bytes

f=n=>n?f(n>>4)+'HBKD'[n/4&3]+'OAEI'[n&3]:''

Saved 10 bytes (no support for n = 0 anymore)

Demo

var f=n=>n?f(n>>4)+'HBKD'[n/4&3]+'OAEI'[n&3]:''

console.log(f(2048));   // -> KOHOHO
console.log(f(156));    // -> KADO
console.log(f(10000));  // -> HEBIHAHO
console.log(f(12));     // -> DO


答:
Ruby, <s>85</s> 83 bytes

```<code>->x{x.to_s(16).chars.map{|d|"HOHAHEHIBOBABEBIKOKAKEKIDODADEDI"[2*d.to_i(16),2]}*''}
</code>```

Just a quick and simple solution without encoding the string.

Title: Convert to Bibi-binary

Body:
Ruby, <s>85</s> 83 bytes

->x{x.to_s(16).chars.map{|d|"HOHAHEHIBOBABEBIKOKAKEKIDODADEDI"[2*d.to_i(16),2]}*''}

Just a quick and simple solution without encoding the string.


答:
Ruby, <s>55</s> 51 bytes

A recursive anonymous function:

```<code>f=->i{(i>15?f[i/16]:'')+'HBKD'[i%16/4]+'OAEI'[i%4]}
</code>```

Call it for example with f[156] and it returns "KADO"

Title: Convert to Bibi-binary

Body:
Ruby, <s>55</s> 51 bytes

A recursive anonymous function:

f=->i{(i>15?f[i/16]:'')+'HBKD'[i%16/4]+'OAEI'[i%4]}

Call it for example with f[156] and it returns "KADO"


答:
PHP ,63 Bytes

contribution by @Titus Thank You

for($n=$argv[1];$n;$n>>=4)$r=HBKD[$n/4&3].OAEI[$n&3].$r;echo$r;
```

<p>72 Bytes works also with zero</p>

<pre class="lang-php prettyprint-override"><code>do$r=OAEIHBKD[$t*4+($n=&$argv[1])%4].$r;while(($t=!$t)|$n=$n>>2);echo$r;
</code>```

76 Bytes alternative Version

for($i=2*strlen(dechex($n=$argv[1]));$i;)echo HBKDOAEI[$i%2*4+$n/4**--$i%4];
```

Title: Convert to Bibi-binary

Body:
PHP ,63 Bytes

contribution by @Titus Thank You

for($n=$argv[1];$n;$n>>=4)$r=HBKD[$n/4&3].OAEI[$n&3].$r;echo$r;

72 Bytes works also with zero

do$r=OAEIHBKD[$t*4+($n=&$argv[1])%4].$r;while(($t=!$t)|$n=$n>>2);echo$r;

76 Bytes alternative Version

for($i=2*strlen(dechex($n=$argv[1]));$i;)echo HBKDOAEI[$i%2*4+$n/4**--$i%4];


答:
dc, x = 5, score 0

# Note: in dc all numbers typed in use the input radix. By default it is 10, which
#means that a number like CF is not 207, but 12*10^1 + 15*10^0 = 135.

CCDap              # 5   print character with the ASCII code  (1333 % 256 =) 53
CCEadp             # 6   print character with the ASCII code  (1334 % 256 =) 54
CCFaddp            # 7   print character with the ASCII code  (1335 % 256 =) 55
ACBAaddp           # 8   print character with the ASCII code (11320 % 256 =) 56
ACBBadddp          # 9   print character with the ASCII code (11321 % 256 =) 57
Addddddddp         #10   print 10 (A)
Bdddddddddp        #11   print 11 (B)
Cddddddddddp       #12   print 12 (C)
Ddddddddddddp      #13   print 13 (D)
Eddddddddddddp     #14   print 14 (E)
```

Comments were added for a better understanding. All the above 10 programs are standalone, but you could have a bonus program that prints all the numbers from 5 to 14, by copy-pasting each code into one single file.

Title: Outputting x to y

Body:
dc, x = 5, score 0

# Note: in dc all numbers typed in use the input radix. By default it is 10, which
#means that a number like CF is not 207, but 12*10^1 + 15*10^0 = 135.

CCDap              # 5   print character with the ASCII code  (1333 % 256 =) 53
CCEadp             # 6   print character with the ASCII code  (1334 % 256 =) 54
CCFaddp            # 7   print character with the ASCII code  (1335 % 256 =) 55
ACBAaddp           # 8   print character with the ASCII code (11320 % 256 =) 56
ACBBadddp          # 9   print character with the ASCII code (11321 % 256 =) 57
Addddddddp         #10   print 10 (A)
Bdddddddddp        #11   print 11 (B)
Cddddddddddp       #12   print 12 (C)
Ddddddddddddp      #13   print 13 (D)
Eddddddddddddp     #14   print 14 (E)

Comments were added for a better understanding. All the above 10 programs are standalone, but you could have a bonus program that prints all the numbers from 5 to 14, by copy-pasting each code into one single file.


问:
Draw an Empty Scrabble Board
A standard Scrabble board is a 15×15 grid of spaces to place letter tiles. Most of the spaces are blank but some are double word scores (pink), triple word scores (red), double letter scores (light blue), and triple letter scores (blue). There is usually a star in the very center (which counts as a double word score).

Write a program or function that outputs a standard, empty Scrabble board in ASCII form where:

. represents an empty space

D represents a double word score

T represents a triple word score

d represents a double letter score

t represents a triple letter score

X represents the center star

That is, your exact output must be

```<code>T..d...T...d..T
.D...t...t...D.
..D...d.d...D..
d..D...d...D..d
....D.....D....
.t...t...t...t.
..d...d.d...d..
T..d...X...d..T
..d...d.d...d..
.t...t...t...t.
....D.....D....
d..D...d...D..d
..D...d.d...D..
.D...t...t...D.
T..d...T...d..T
</code>```

optionally followed by a trailing newline.

The shortest code in bytes wins.

Title: Draw an Empty Scrabble Board

Body:
sh + coreutils, 119 bytes

This is a binary file. Shown as hexdump:

00000000  74 61 69 6c 20 2d 63 39  34 20 24 30 7c 67 75 6e  |tail -c94 $0|gun|
00000010  7a 69 70 0a 65 78 69 74  0a 1f 8b 08 00 2e ec ca  |zip.exit........|
00000020  57 00 03 65 4f c9 0d c0  30 08 fb 7b 18 4f 91 11  |W..eO...0..{.O..|
00000030  fc e8 00 1e a1 fb ab 08  68 a4 90 07 60 d9 98 43  |........h...`..C|
00000040  a4 49 8a 59 05 ae 40 6f  c7 22 98 84 b3 29 10 fc  |.I.Y..@o."...)..|
00000050  13 59 1d 7a 11 9d b1 bd  15 a8 56 77 26 54 c4 b3  |.Y.z......Vw&T..|
00000060  f7 0d fd f6 9f f3 ef fd  e7 7d f3 7e 8d ff 3e 05  |.........}.~..>.|
00000070  57 d9 a0 f0 00 00 00                              |W......|
00000077

Here's the base64 form so you can copy/paste it:

begin-base64 755 test.sh
dGFpbCAtYzk0ICQwfGd1bnppcApleGl0Ch+LCAAu7MpXAANlT8kNwDAI+3sY
T5ER/OgAHqH7qwhopJAHYNmYQ6RJilkFrkBvxyKYhLMpEPwTWR16EZ2xvRWo
VncmVMSz9w399p/z7/3nffN+jf8+BVfZoPAAAAA=
====


答:
Pyth, 21 bytes

```<code>sm@*"HBKD""OAEI"djQ16
</code>```

A program that takes input of an integer from STDIN and prints the result.

Try it online

How it works

```<code>sm@*"HBKD""OAEI"djQ16  Program. Input: Q
                 jQ16  Yield decimal digits of the base-16 representation of Q as a list
    "HBKD"              Possible first letters
          "OAEI"        Possible second letters
   *                    Cartesian product of those two strings
  @                     Index into the above
 m              d      Map that across the digits list
s                      Concatenate
                       Implicitly print
</code>```

Title: Convert to Bibi-binary

Body:
Pyth, 21 bytes

sm@*"HBKD""OAEI"djQ16

A program that takes input of an integer from STDIN and prints the result.

Try it online

How it works

sm@*"HBKD""OAEI"djQ16  Program. Input: Q
                 jQ16  Yield decimal digits of the base-16 representation of Q as a list
    "HBKD"              Possible first letters
          "OAEI"        Possible second letters
   *                    Cartesian product of those two strings
  @                     Index into the above
 m              d      Map that across the digits list
s                      Concatenate
                       Implicitly print


问:
The Letter E with E
Your task is to display the below letter "E" shaped ASCII art, given five inputs.

Examples:

Input: 7,2,+,|,- (Note: You don't have to follow this exact input format, and if you don't use it, then you must explain how your own input format works)

Explanation:

7 total width, including the left and right edge characters.

2 Number of vertical characters.

+ The character that should display at the edges.

| The character that should display vertically between the edges.

- The character that should display horizontally.

Output of the above example:

```<code>+-----+
|
|
+-----+
|
|
+-----+
</code>```

Other examples:

Input: 7,2,@,|,-

Output:

```<code>@-----@
|
|
@-----@
|
|
@-----@
</code>```

Input: 7,2,+,|,#

Output:

```<code>+#####+
|
|
+#####+
|
|
+#####+
</code>```

Input: 8,3,+,|,#

Output:

```<code>+######+
|
|
|
+######+
|
|
|
+######+
</code>```

Input: 8,3,+,@,#

Output:

```<code>+######+
@
@
@
+######+
@
@
@
+######+
</code>```

Input: 9,4,^,$,!

Output:

```<code>^!!!!!!!^
$
$
$
$
^!!!!!!!^
$
$
$
$
^!!!!!!!^
</code>```

Cheating and standard loopholes are not allowed.

Your code must not print anything to STDERR.

Your code may accept any character encoding you choose as the input, but any character encoding you choose must, as a minimum, support all the 95 printable ASCII characters.

The shortest code, in bytes, that completes this challenge successfully, is the winning code.

Leaderboard

var QUESTION_ID=92138,OVERRIDE_USER=58717;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="
"+e.body.replace(OVERRIDE_REG,"")+"
")});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;/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;```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}</code>```

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

```

Title: The Letter E with E

Body:
Javascript (ES6), 64 bytes

(h,v,e,V,H)=>(v=(h=e+H.repeat(h-2)+e)+`
${V}`.repeat(v)+`
`)+v+h

Example

let f =
(h,v,e,V,H)=>(v=(h=e+H.repeat(h-2)+e)+`
${V}`.repeat(v)+`
`)+v+h

console.log(f(8,3,'+','@','#'))


Title: Rolling three dice and show the probabilities

Body:
Roll 3 dice, count the two highest two values and add them to the result. Every 1 must be rolled once again.

Now show the average throw after 1000000 tries and the probabilities for each result occurring:

Desired Result:

avg(9.095855)

  2: 0.0023

  3: 0.0448

  4: 1.1075

  5: 2.8983

  6: 6.116

  7: 10.1234

  8: 15.4687

  9: 18.9496

  10: 19.3575

  11: 16.0886

  12: 9.8433

Body:
Python, 262

import random
r=random.randint
def f():n=r(1,6);return n if n>1 else r(1,6)
l=[0.0]*13
for i in range(10**6):l[sum(sorted([f(),f(),f()])[1:])]+=1
m=zip(*[range(2,13),l[2:]])
print'avg('+`sum([a*b for a,b in m])/10**6`+')'
for e in m:print`e[0]`+': '+`e[1]/10**4`

results:

avg(9.098773)
2: 0.0021
3: 0.044
4: 1.0872
5: 2.89
6: 6.0982
7: 10.133
8: 15.5
9: 18.949
10: 19.2908
11: 16.0953
12: 9.9104


答:
Python, <s>53</s> <s>51</s> 55 Bytes

lambda a,b,c,d,e:d.join("\n"*-~b).join([c+e*(a-2)+c]*3)
```

<p><em>+4 Bytes thanks to @nimi</em></p>

<p>anonymous lambda function, to call it, write <code>f=</code> before it. Example:</p>

<pre class="lang-py prettyprint-override"><code>>>> print f(4,1,"€","|","-")
€--€
|
€--€
|
€--€
</code>```

alternative, 53 Bytes

lambda a,b,c,d,e:((c+e*a+c+"\n"+(d+"\n")*b)*3)[:-b*2]
```

<h2>old version with the special case of no input, <s>69</s> <s>65</s> 63 Bytes</h2>

<p>yay to changing the requirements mid-challenge...</p>

<pre class="lang-py prettyprint-override"><code>lambda a=1,b=1,(c,d,e)="+|-":d.join("\n"*-~b).join([c+e*a+c]*3)
</code>```

Title: The Letter E with E

Body:
Your task is to display the below letter "E" shaped ASCII art, given five inputs.

Examples:

Input: 7,2,+,|,- (Note: You don't have to follow this exact input format, and if you don't use it, then you must explain how your own input format works)

Explanation:

7 total width, including the left and right edge characters.

2 Number of vertical characters.

+ The character that should display at the edges.

| The character that should display vertically between the edges.

- The character that should display horizontally.

Output of the above example:

```<code>+-----+
|
|
+-----+
|
|
+-----+
</code>```

Other examples:

Input: 7,2,@,|,-

Output:

```<code>@-----@
|
|
@-----@
|
|
@-----@
</code>```

Input: 7,2,+,|,#

Output:

```<code>+#####+
|
|
+#####+
|
|
+#####+
</code>```

Input: 8,3,+,|,#

Output:

```<code>+######+
|
|
|
+######+
|
|
|
+######+
</code>```

Input: 8,3,+,@,#

Output:

```<code>+######+
@
@
@
+######+
@
@
@
+######+
</code>```

Input: 9,4,^,$,!

Output:

```<code>^!!!!!!!^
$
$
$
$
^!!!!!!!^
$
$
$
$
^!!!!!!!^
</code>```

Cheating and standard loopholes are not allowed.

Your code must not print anything to STDERR.

Your code may accept any character encoding you choose as the input, but any character encoding you choose must, as a minimum, support all the 95 printable ASCII characters.

The shortest code, in bytes, that completes this challenge successfully, is the winning code.

Leaderboard

var QUESTION_ID=92138,OVERRIDE_USER=58717;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="
"+e.body.replace(OVERRIDE_REG,"")+"
")});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;/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;```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}</code>```

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

```

Body:
Python, <s>53</s> <s>51</s> 55 Bytes

lambda a,b,c,d,e:d.join("\n"*-~b).join([c+e*(a-2)+c]*3)

+4 Bytes thanks to @nimi

anonymous lambda function, to call it, write f= before it. Example:

>>> print f(4,1,"€","|","-")
€--€
|
€--€
|
€--€

alternative, 53 Bytes

lambda a,b,c,d,e:((c+e*a+c+"\n"+(d+"\n")*b)*3)[:-b*2]

old version with the special case of no input, <s>69</s> <s>65</s> 63 Bytes

yay to changing the requirements mid-challenge...

lambda a=1,b=1,(c,d,e)="+|-":d.join("\n"*-~b).join([c+e*a+c]*3)


答:
PHP, 93 bytes

```<code>$a=HBKDOAEI;$h=dechex($argv[1]);while($h{$i}!=''|$c=hexdec($h{$i++}))echo$a{$c/4}.$a{4+$c%4};
</code>```

This basically leverages the integrated hexadecimal functions and a little trick in the while statement to save on curly braces.

Title: Convert to Bibi-binary

Body:
Bibi-binary is a numeric system invented by Boby Lapointe in order to represent numbers in letters which pronunciation seems funny.

Your task is to convert decimal numbers into Bibi-binary!

Conversion

A number is converted to base 16 (hexadecimal) and each character is replaced by its Bibi-binary name:

```<code>0 = HO
1 = HA
2 = HE
3 = HI
4 = BO
5 = BA
6 = BE
7 = BI
8 = KO
9 = KA
A = KE
B = KI
C = DO
D = DA
E = DE
F = DI
</code>```

Let N be a positive integer (between 1 -> 2^31-1).
For every character in the hexadecimal representation of N, replace the character by its according Bibi-binary pair (the table above contains all the pairs).

Example

N = 156

H = (hexadecimal representation of N) --> 9C

9 --> KA, C --> DO

Thus the output is KADO.

Input & output

You will receive an positive 32-bit integer N, which you will have to turn into Bibi-binary.

You may (return, print, etc...) in any convenient format, but the pairs have to be connected! So KA DO wouldn't be okay, but KADO would.

Both, lowercase and uppercase are allowed.

Rules

No loopholes.

This is code-golf, so the shortest code wins.

Testcases

```<code>2048 -> KOHOHO
156 -> KADO
10000 -> HEBIHAHO
12 -> DO
</code>```

Body:
PHP, 93 bytes

$a=HBKDOAEI;$h=dechex($argv[1]);while($h{$i}!=''|$c=hexdec($h{$i++}))echo$a{$c/4}.$a{4+$c%4};

This basically leverages the integrated hexadecimal functions and a little trick in the while statement to save on curly braces.


答:
Mathematica 82 bytes

This pads the digits of each number with x's to the right, transposes the matrix, removes the dummy x's, orders by sum of the digits and takes the greatest.

```<code>SortBy[#~Select~NumberQ&/@Transpose[PadRight[#,30,x]&/@IntegerDigits@#],Tr][[-1]]&
</code>```

There ought to be some way to use the superscript-T form of Transpose to save a few bytes.

Title: Find every digit from the largest column

Body:
Here's a relatively simple challenge for you:

Given a list of positive integers:

Line them up in a grid, and sum each column. For example, if the input was [123, 7, 49, 681], the grid would look like this:

```<code> 1  2  3
 7
 4  9
 6  8  1
</code>```

And the sum of each column would be [18, 19, 4]:

```<code> 1  2  3
 7
 4  9
 6  8  1
 --------
 18 19 4
</code>```

Find the maximum of these sums, which in this case would be 19, and then

Output every digit that is at the same index as this maximum column. In this case, that would be

```<code>2
9
8
</code>```

You do not have to output these numbers in any particular order.
Note that there are only three outputs, even though we had 4 inputs. In the case of a tie, pick the earliest index. For example, if the input was [25, 223, 302], your grid is:

```<code>2  5
2  2  3
3  0  2
-------
7  7  5
</code>```

You should output

```<code>2
2
3
</code>```

You can print these numbers in any format you like. List format, newline separated, space separated, etc. You may not take the input as a 2D array of digits, e.g.

```<code>[[1, 2, 3],
[7],
[4, 9],
[6, 8, 1]
</code>```

But other than that, you can take input as a list of strings, a list of digits, or any other reasonable format.

You may also assume that all inputs will be valid and contain at least two numbers.

As usual, the shortest answer in bytes wins!

Test IO:

```<code>#Input                      #Output
[1, 11, 111, 1111]      --> [1, 1, 1, 1]
[1, 12, 123]            --> [2, 2]
[987654321, 111]        --> [9, 1]
[111, 123456789]        --> [9]
[4, 8, 15, 16, 23, 42]  --> [4, 8, 1, 1, 2, 4]
[4, 8, 12, 26, 27, 38]  --> [2, 6, 7, 8]
[24, 53]                --> [2, 5]
[12, 304, 506]          --> [4, 6]
[30, 285, 121]          --> [0, 8, 2]
</code>```

Body:
Mathematica 82 bytes

This pads the digits of each number with x's to the right, transposes the matrix, removes the dummy x's, orders by sum of the digits and takes the greatest.

SortBy[#~Select~NumberQ&/@Transpose[PadRight[#,30,x]&/@IntegerDigits@#],Tr][[-1]]&

There ought to be some way to use the superscript-T form of Transpose to save a few bytes.


答:
05AB1E, <s>16</s> 14 bytes

```<code>Í×s.ø©|`×`»D®»
</code>```

Explanation

```<code>Í×                  # create a string of the correct nr of horizontal chars
  s.ø               # add the corner char on both sides
     ©              # save in register while keeping it on the stack
      |`            # push the remaining inputs to the top of the stack
        ×`          # push the correct nr of vertical chars on the stack
          »         # join on newline (joining the top vertical and horizontal sections)
           D        # duplicate this
            ®       # push the horizontal part again
             »      # join everything on newline
</code>```

Try it online!

Saved 4 bytes thanks to Adnan.

Title: The Letter E with E

Body:
05AB1E, <s>16</s> 14 bytes

Í×s.ø©|`×`»D®»

Explanation

Í×                  # create a string of the correct nr of horizontal chars
  s.ø               # add the corner char on both sides
     ©              # save in register while keeping it on the stack
      |`            # push the remaining inputs to the top of the stack
        ×`          # push the correct nr of vertical chars on the stack
          »         # join on newline (joining the top vertical and horizontal sections)
           D        # duplicate this
            ®       # push the horizontal part again
             »      # join everything on newline

Try it online!

Saved 4 bytes thanks to Adnan.


答:
Ruby, <s>54</s> <s>45</s> 42 bytes

->x,y,c,v,h{[c+h*~-~-x+c+$/]*3*((v+$/)*y)}
```

<p>It's an anonymous function that takes the different part of the input as separate parameters and returns the result as a complete string.</p>

<p>For example,</p>

<pre class="lang-rb prettyprint-override"><code>f=->x,y,c,v,h{[c+h*~-~-x+c+$/]*3*((v+$/)*y)}
puts f[6, 2, 'Ø', 'V', '>']
</code>```

prints

Ø>>>>Ø
V
V
Ø>>>>Ø
V
V
Ø>>>>Ø
```

Title: The Letter E with E

Body:
Ruby, <s>54</s> <s>45</s> 42 bytes

->x,y,c,v,h{[c+h*~-~-x+c+$/]*3*((v+$/)*y)}

It's an anonymous function that takes the different part of the input as separate parameters and returns the result as a complete string.

For example,

f=->x,y,c,v,h{[c+h*~-~-x+c+$/]*3*((v+$/)*y)}
puts f[6, 2, 'Ø', 'V', '>']

prints

Ø>>>>Ø
V
V
Ø>>>>Ø
V
V
Ø>>>>Ø


答:
Perl, 40 + 1 (-n) = 41 bytes

Thanks to @Ton Hospel for saving 14 bytes and allowing the program to work with entry greater than 10.

/.$/;$,=$/.<>x<>;say+($`.$&x(<>-2).$`)x3
```
<p>Need <code>-n</code> as well as <code>-E</code> (or <code>-M5.010</code>) to run.
For instance :</p>
```perl -nE '/.$/;$,=$/.<>x<>;say+($`.$&x(<>-2).$`)x3' <<< '^$
!
4
9'
```

Title: The Letter E with E

Body:
Perl, 40 + 1 (-n) = 41 bytes

Thanks to @Ton Hospel for saving 14 bytes and allowing the program to work with entry greater than 10.

/.$/;$,=$/.<>x<>;say+($`.$&x(<>-2).$`)x3

Need -n as well as -E (or -M5.010) to run.
For instance :

perl -nE '/.$/;$,=$/.<>x<>;say+($`.$&x(<>-2).$`)x3' <<< '^$
!
4
9'


答:
Jelly, 17 bytes

```<code>b⁴d4ị"€“BKDH“AEIO
</code>```

Try it online! or verify all test cases.

How it works

```<code>b⁴d4ị"€“BKDH“AEIO  Main link. Argument: n

b⁴                 Convert n to base 16.
  d4               Divmod 4; map each base-16 digit k to [k / 4, k % 4].
       “BKDH“AEIO  Yield ["BKDH", "AEIO"].
      €            For each quotient-remainder pair [q, r]:
    ị"               Yield "BKDH"[q] and "AEIO"[r] (1-based indexing).
</code>```

Title: Convert to Bibi-binary

Body:
Jelly, 17 bytes

b⁴d4ị"€“BKDH“AEIO

Try it online! or verify all test cases.

How it works

b⁴d4ị"€“BKDH“AEIO  Main link. Argument: n

b⁴                 Convert n to base 16.
  d4               Divmod 4; map each base-16 digit k to [k / 4, k % 4].
       “BKDH“AEIO  Yield ["BKDH", "AEIO"].
      €            For each quotient-remainder pair [q, r]:
    ị"               Yield "BKDH"[q] and "AEIO"[r] (1-based indexing).


答:
C, <s>167</s> <s>161</s> 159 bytes

Yeah.

#define p putchar
i,j;g(a,c,e){p(c);for(i=2;i++<a;)p(e);p(c);p(10);}h(b,d){for(i=0;i++<b;){p(d);p(10);}}f(a,b,c,d,e){g(a,c,e);h(b,d);g(a,c,e);h(b,d);g(a,c,e);}
```

Try it on Ideone, with some test cases

Title: The Letter E with E

Body:
C, <s>167</s> <s>161</s> 159 bytes

Yeah.

#define p putchar
i,j;g(a,c,e){p(c);for(i=2;i++<a;)p(e);p(c);p(10);}h(b,d){for(i=0;i++<b;){p(d);p(10);}}f(a,b,c,d,e){g(a,c,e);h(b,d);g(a,c,e);h(b,d);g(a,c,e);}

Try it on Ideone, with some test cases


答:
Python (<s>207 194</s> 189)

```<code>from random import*
a=lambda:randint(13,48)/7
r=range
x=[0]*13
s=0
for i in r(10**6):b=sum(sorted([a(),a(),a()])[1:]);x[b]+=1e-4;s+=b/1e6
print'avg(%f)'%s
for i in r(2,13):print`i`+':',x[i]
</code>```

Algorithm:

```<code>a is the RNG, x is the list which contains the results, s is the sum. r is for code-golfing purposes.
1. Iterate through steps 2-6 1,000,000 times:
2. Get three random numbers from `a` and put them in a list.
3. Sort the list. (list is now in ascending order)
4. Take the sum of every item but the first item in the list. Call this number b.
5. Increment the (b)th index of x by 1e-4 (1/10000).
6. Increment s by b * 1e-6 (1/1000000).
7. Print out s.
8. For each item in x (excluding the first two), output the item.
</code>```

Body:
Python (<s>207 194</s> 189)

from random import*
a=lambda:randint(13,48)/7
r=range
x=[0]*13
s=0
for i in r(10**6):b=sum(sorted([a(),a(),a()])[1:]);x[b]+=1e-4;s+=b/1e6
print'avg(%f)'%s
for i in r(2,13):print`i`+':',x[i]

Algorithm:

a is the RNG, x is the list which contains the results, s is the sum. r is for code-golfing purposes.
1. Iterate through steps 2-6 1,000,000 times:
2. Get three random numbers from `a` and put them in a list.
3. Sort the list. (list is now in ascending order)
4. Take the sum of every item but the first item in the list. Call this number b.
5. Increment the (b)th index of x by 1e-4 (1/10000).
6. Increment s by b * 1e-6 (1/1000000).
7. Print out s.
8. For each item in x (excluding the first two), output the item.


答:
Pyth, 11 bytes

```<code>h.MsZ.TmjdT
</code>```

A program that takes input of a list of integers on STDIN and prints a list.

Try it online

How it works

```<code>h.MsZ.TmjdT  Program. Input: Q
        j T   Yield the base-10 representation, giving a list of digits
       m d   Map that over Q (implicit input fill)
     .T      Justified transpose, giving each column as a list
 .MsZ        Filter the above by maximum sum
h            First element of above
             Implicitly print
</code>```

Body:
Pyth, 11 bytes

h.MsZ.TmjdT

A program that takes input of a list of integers on STDIN and prints a list.

Try it online

How it works

h.MsZ.TmjdT  Program. Input: Q
        j T   Yield the base-10 representation, giving a list of digits
       m d   Map that over Q (implicit input fill)
     .T      Justified transpose, giving each column as a list
 .MsZ        Filter the above by maximum sum
h            First element of above
             Implicitly print


问:
Scan dactylic hexameter in a unique puzzle
As a terrible Latin student for several years I have learned to hate many things about Latin.  However there is one thing I love.

Latin scansion.

Scansion is the act of determining the meter of a particular line of poetry.  For Latin this means demarcating each syllable in the line as "light" or "heavy".

In Latin scansion has many of rules.  However unlike English Latin scansion is fairly regular and often requires no knowledge of Latin vocabulary or grammar to be performed.  For this problem we will be using simplified subset of those rules (real Latin does not have a neat spec).

Before you begin the scansion you must elide. Elision is the dropping syllables between words to ease pronunciation. (e.g. "he is" -> "he's"). Unlike English, Latin elision follows very nice rules.

The final vowel of a word ending with a vowel is omitted if the next word begins with a vowel.

NAUTA EST -> NAUTEST

The same goes for words ending in a vowel followed by "m".

FIDUM AGRICOLAM -> FIDAGRICOLAM

Word-initial "h" followed by a vowel counts as a single vowel for elision purposes and is always dropped when elided.

MULTAE HORAE -> MULTORAE

or

MULTAM HORAM -> MULTORAM

After elision we can begin scansion.  Scansion is done to a specific meter.  The meter for this challenge is dactylic hexameter.  Dactylic hexameter has six "feet" each foot consists of two or three syllables.  Syllables can be either long or short depending on the vowel.  Each of the first five feet will be either a dactyl, a long syllable followed by two short ones, or a spondee, two long syllables. And the last foot will be a long followed by an anceps (short or long, for this problem you will not have to determine which).

A vowel in latin can be either short or long

An "i" sandwiched between two vowels (e.g. eiectum) is a consonant. (i.e. a "j")

An "i" beginning a word followed by a vowel (e.g Iactus) is also a consonant

A "u" after a "q" is also a consonant (i.e. a "v")

Diphthongs (ae, au, ei, eu, oe, and ui) are made up of two vowels but count as one vowel and are always long

A vowel with two or more consonants between it and the next vowel is always long

For the previous rule an "l" or an "r" after a "b","c","d","g","p", or "t" does not count as a consonant

"x" counts as two consonants

"ch", "ph", "th", and "qu" count as one consonant

The syllable "que" at the end of a word (after elision) is always short

If a vowel is not forced by one of the previous rules it can be either long or short this will depend on the meter

Your task will be to take a line of latin and produce the scansion of it.  You will take in the line as string via standard input and output a string representing the final scansion.

The input will contain only spaces and characters A-Z.

To represent the scansion you will output all of the syllables with | demarcating the separation of feet.  A long syllable will be represented by a - while a short syllable will be marked by a v and an anceps (the last syllable of every line) will be marked by a x.  If there are multiple solutions as there often will be you may output anyone of them.

Test Cases

The start of Virgil's Aeneid.

```<code> ARMA VIRUMQUE CANO TROIAE QUI PRIMUS AB ORIS     -> -vv|-vv|--|--|-vv|-x (or -vv|-vv|--|-vv|--|-x)
 ITALIAM FATO PROFUGUS LAVINIAQUE VENIT           -> -vv|--|-vv|-vv|-vv|-x
 LITORA MULTUM ILLE ET TERRIS IACTATUS ET ALTO    -> -vv|--|--|--|-vv|-x
 VI SUPERUM SAEVAE MEMOREM IUNONIS OB IRAM        -> -vv|--|-vv|--|-vv|-x (or -vv|--|-vv|-vv|--|-x)
 MULTA QUOQUE ET BELLO PASSUS DUM CONDERET URBEM  -> -vv|--|--|--|-vv|-x
 INFERRETQUE DEOS LATIO GENUS UNDE LATINUM        -> --|-vv|-vv|-vv|-vv|-x
 ALBANIQUE PATRES ATQUE ALTAE MOENIA ROMAE        -> --|-vv|--|--|-vv|-x
</code>```

Further stipulations

In the proper fashion of Latin poetry all answers must begin with an invocation to the muses.

Latin has only two one letter words "e" and "a".  You may assume that no other one letter words will appear as input.

答:
sed, <s>402</s> <s>392</s> <s>374</s> <s>359</s> <s>363</s> <s>334</s> 333 bytes

“Sing, goddess, the anger of Peleus’ son Achilleus
  and its devastation, which put pains thousandfold upon the Achians,
  hurled in their multitudes to the house of Hades strong souls
  of heroes, but gave their bodies to be the delicate feasting
  of dogs, of all birds, and the will of Zeus was accomplished
  since that time when first there stood in division of conflict
  Atreus’ son the lord of men and brilliant Achilleus.”

— Homer (The Iliad); confused why this quote is here? check the rules.

```<code>sed -E 's/[AEIOU]M? H?([AEIOU])/\1/g;s/X/cc/g;s/(^|[ AEIOU])I([AEIOU])/\1c\2/g;s/QUE( |$)/cv/g;s/A[EU]|E[IU]|OE|UI/-/g;s/[CPT]H|[BCDGPT][LR]|QU|[^-vAEIOU ]/c/g;s/ //g;s/ucc+/-/g;s/c//g;s/^[-u]([-u]|[vu]{2})[-u]([-u]|[vu]{2})[-u]([-u]|[vu]{2})[-u]([-u]|[vu]{2})[-u]([-u]|[vu]{2})[-u].$/-\1|-\2|-\3|-\4|-\5|-x/;s/[uv]/-/g;s/---/-vv/g'
</code>```

Not exactly golfed, but this implements all the given rules in the form of regular expressions, which sed just runs one-by-one to reach the solution. This handles each line independently, so can process an entire multi-line input.

Usage:

printf 'ARMA VIRUMQUE CANO TROIAE QUI PRIMUS AB ORIS
ITALIAM FATO PROFUGUS LAVINIAQUE VENIT
LITORA MULTUM ILLE ET TERRIS IACTATUS ET ALTO
VI SUPERUM SAEVAE MEMOREM IUNONIS OB IRAM
MULTA QUOQUE ET BELLO PASSUS DUM CONDERET URBEM
INFERRETQUE DEOS LATIO GENUS UNDE LATINUM
ALBANIQUE PATRES ATQUE ALTAE MOENIA ROMAE' | sed -E '<...>';
```

<h3>Breakdown:</h3>

<pre class="lang-sh prettyprint-override"><code>sed -E "
# Apply Elision
 s/[AEIOU]M? H?([AEIOU])/\1/g;

# Convert into vowels (u, v or -) and consonants (c) according to the rules given
 s/X/cc/g;
 s/(^|[ AEIOU])I([AEIOU])/\1c\2/g;
 s/QUE( |\$)/cv/g;
 s/A[EU]|E[IU]|OE|UI/-/g;
 s/[CPT]H|[BCDGPT][LR]|QU|[^-vAEIOU ]/c/g;
 s/[A-Z]/u/g; # all remaining vowels are unknown

# Remove all spaces
 s/ //g;

# A vowel followed by 2 consonants before the next vowel is long
# (and we don't care if the last vowel is long or short)
 s/ucc+/-/g;

# Remove all consonants
 s/c//g;

# Look for a matching dactylic hexameter and insert pipe separators
 s/^\
[-u]([-u]|[vu]{2})\
[-u]([-u]|[vu]{2})\
[-u]([-u]|[vu]{2})\
[-u]([-u]|[vu]{2})\
[-u]([-u]|[vu]{2})\
[-u].\$/-\1|-\2|-\3|-\4|-\5|-x/;

# Substitute identified feet with the necessary long/short vowels
 s/[uv]/-/g;
 s/---/-vv/g
"
</code>```

Results for test cases:

```<code>-vv|-vv|--|--|-vv|-x
-vv|-vv|--|-vv|-vv|-x
-vv|--|--|--|-vv|-x
-vv|--|-vv|-vv|--|-x
-vv|--|--|--|-vv|-x
--|-vv|-vv|-vv|-vv|-x
--|-vv|--|--|-vv|-x
</code>```

Body:
sed, <s>402</s> <s>392</s> <s>374</s> <s>359</s> <s>363</s> <s>334</s> 333 bytes

“Sing, goddess, the anger of Peleus’ son Achilleus
  and its devastation, which put pains thousandfold upon the Achians,
  hurled in their multitudes to the house of Hades strong souls
  of heroes, but gave their bodies to be the delicate feasting
  of dogs, of all birds, and the will of Zeus was accomplished
  since that time when first there stood in division of conflict
  Atreus’ son the lord of men and brilliant Achilleus.”

— Homer (The Iliad); confused why this quote is here? check the rules.

sed -E 's/[AEIOU]M? H?([AEIOU])/\1/g;s/X/cc/g;s/(^|[ AEIOU])I([AEIOU])/\1c\2/g;s/QUE( |$)/cv/g;s/A[EU]|E[IU]|OE|UI/-/g;s/[CPT]H|[BCDGPT][LR]|QU|[^-vAEIOU ]/c/g;s/ //g;s/ucc+/-/g;s/c//g;s/^[-u]([-u]|[vu]{2})[-u]([-u]|[vu]{2})[-u]([-u]|[vu]{2})[-u]([-u]|[vu]{2})[-u]([-u]|[vu]{2})[-u].$/-\1|-\2|-\3|-\4|-\5|-x/;s/[uv]/-/g;s/---/-vv/g'

Not exactly golfed, but this implements all the given rules in the form of regular expressions, which sed just runs one-by-one to reach the solution. This handles each line independently, so can process an entire multi-line input.

Usage:

printf 'ARMA VIRUMQUE CANO TROIAE QUI PRIMUS AB ORIS
ITALIAM FATO PROFUGUS LAVINIAQUE VENIT
LITORA MULTUM ILLE ET TERRIS IACTATUS ET ALTO
VI SUPERUM SAEVAE MEMOREM IUNONIS OB IRAM
MULTA QUOQUE ET BELLO PASSUS DUM CONDERET URBEM
INFERRETQUE DEOS LATIO GENUS UNDE LATINUM
ALBANIQUE PATRES ATQUE ALTAE MOENIA ROMAE' | sed -E '<...>';

Breakdown:

sed -E "
# Apply Elision
 s/[AEIOU]M? H?([AEIOU])/\1/g;

# Convert into vowels (u, v or -) and consonants (c) according to the rules given
 s/X/cc/g;
 s/(^|[ AEIOU])I([AEIOU])/\1c\2/g;
 s/QUE( |\$)/cv/g;
 s/A[EU]|E[IU]|OE|UI/-/g;
 s/[CPT]H|[BCDGPT][LR]|QU|[^-vAEIOU ]/c/g;
 s/[A-Z]/u/g; # all remaining vowels are unknown

# Remove all spaces
 s/ //g;

# A vowel followed by 2 consonants before the next vowel is long
# (and we don't care if the last vowel is long or short)
 s/ucc+/-/g;

# Remove all consonants
 s/c//g;

# Look for a matching dactylic hexameter and insert pipe separators
 s/^\
[-u]([-u]|[vu]{2})\
[-u]([-u]|[vu]{2})\
[-u]([-u]|[vu]{2})\
[-u]([-u]|[vu]{2})\
[-u]([-u]|[vu]{2})\
[-u].\$/-\1|-\2|-\3|-\4|-\5|-x/;

# Substitute identified feet with the necessary long/short vowels
 s/[uv]/-/g;
 s/---/-vv/g
"

Results for test cases:

-vv|-vv|--|--|-vv|-x
-vv|-vv|--|-vv|-vv|-x
-vv|--|--|--|-vv|-x
-vv|--|-vv|-vv|--|-x
-vv|--|--|--|-vv|-x
--|-vv|-vv|-vv|-vv|-x
--|-vv|--|--|-vv|-x


答:
MATL, 15 bytes

Thanks to @muddyfish for a correction

```<code>2-Y"yv!iiY"!yyy
</code>```

Try it online!

Explanation

The stack contents after each step are indicated for clarity, using the first example in the challenge.

```<code>2-    % Implicitly input number of repetitions of the char of the horizontal line.
      % Subtract 2
      %   STACK: 5
Y"    % Implicitly input char of the horizontal line. Apply run-length decoding
      %   STACK: '-----' (string)
y     % Implicitly input (from below) the char of the corners. Duplicate onto the top
      %   STACK: '+', '-----', '+'
v!    % Concatenate all the stack horizontally. We now have the horizontal line
      % including the corners
      %   STACK: '+-----+'
iiY"  % Take two inputs: char of the vertical line and number of repetitions
      %   STACK: '+-----+', '||'
!     % Transpose. This tranforms the string into a vertical char array, which
      % gives the vertical line
      %   STACK: '+-----+', ['|';'|'] (vertical char array)
y     % Duplicate from below: this pushes a new copy of the horizontal line
      % onto the top of the stack
      %   STACK: '+-----+', ['|';'|'], '+-----+'
y     % Duplicate from below: this pushes a new copy of the vertical line
      % onto the top of the stack
      %   STACK: '+-----+', ['|';'|'], '+-----+', ['|';'|'],
y     % Duplicate from below: this pushes a new copy of the horizontal line
      % onto the top of the stack
      %   STACK: '+-----+', ['|';'|'], '+-----+', ['|';'|'], '+-----+'
      % Implicitly display
</code>```

Title: The Letter E with E

Body:
MATL, 15 bytes

Thanks to @muddyfish for a correction

2-Y"yv!iiY"!yyy

Try it online!

Explanation

The stack contents after each step are indicated for clarity, using the first example in the challenge.

2-    % Implicitly input number of repetitions of the char of the horizontal line.
      % Subtract 2
      %   STACK: 5
Y"    % Implicitly input char of the horizontal line. Apply run-length decoding
      %   STACK: '-----' (string)
y     % Implicitly input (from below) the char of the corners. Duplicate onto the top
      %   STACK: '+', '-----', '+'
v!    % Concatenate all the stack horizontally. We now have the horizontal line
      % including the corners
      %   STACK: '+-----+'
iiY"  % Take two inputs: char of the vertical line and number of repetitions
      %   STACK: '+-----+', '||'
!     % Transpose. This tranforms the string into a vertical char array, which
      % gives the vertical line
      %   STACK: '+-----+', ['|';'|'] (vertical char array)
y     % Duplicate from below: this pushes a new copy of the horizontal line
      % onto the top of the stack
      %   STACK: '+-----+', ['|';'|'], '+-----+'
y     % Duplicate from below: this pushes a new copy of the vertical line
      % onto the top of the stack
      %   STACK: '+-----+', ['|';'|'], '+-----+', ['|';'|'],
y     % Duplicate from below: this pushes a new copy of the horizontal line
      % onto the top of the stack
      %   STACK: '+-----+', ['|';'|'], '+-----+', ['|';'|'], '+-----+'
      % Implicitly display


问:
Wave-Particle Duality Laterally Programmatically
Write a program or function that takes in a nonempty single-line string. The string will either be zero or more spaces followed by one period (a particle), such as . or          ., or the string will be a sequence of one or more alternating forward and back slashes (a wave) that could start with either one, such as \ or /\/ or \/\/\/\/\/\/.

In either case, propagate the particle/wave to the right by one unit.

Specifically, in the particle case, insert a space before the ., moving it one place to the right, then output the resulting string. For example:

. →  .

 . →   .

  . →    .

   . →     .

    . →      .

     . →       .

      . →        .

       . →         .

In the wave case, append either / or \ appropriately so the wave keeps alternating and it's length increases by one, then output the resulting string. For example:

/ → /\

\ → \/

/\ → /\/

\/ → \/\

/\/ → /\/\

\/\ → \/\/

/\/\ → /\/\/

\/\/ → \/\/\

In either case, the output may not have trailing spaces but an optional trailing newline is allowed.

The shortest code in bytes wins.

Body:
C# - 46 bytes

s=>s[0]<47?' '+s:s+(s.EndsWith("/")?'\\':'/')

Try it here.


Title: The Letter E with E

Body:
Python 3, 60 bytes

A Function

def p(a,b,c,d,e):q=c+e*(a-2)+c;return(q+'\n'+(d+'\n')*b)*2+q

Test Case

>>> print(p(8,2,'+','|','#'))
+######+
|
|
+######+
|
|
+######+


答:
Pyke, <s>16</s> 15 bytes

```<code>*2mtz:zn+Q*' +D
</code>```

Try it here!

Title: The Letter E with E

Body:
Your task is to display the below letter "E" shaped ASCII art, given five inputs.

Examples:

Input: 7,2,+,|,- (Note: You don't have to follow this exact input format, and if you don't use it, then you must explain how your own input format works)

Explanation:

7 total width, including the left and right edge characters.

2 Number of vertical characters.

+ The character that should display at the edges.

| The character that should display vertically between the edges.

- The character that should display horizontally.

Output of the above example:

```<code>+-----+
|
|
+-----+
|
|
+-----+
</code>```

Other examples:

Input: 7,2,@,|,-

Output:

```<code>@-----@
|
|
@-----@
|
|
@-----@
</code>```

Input: 7,2,+,|,#

Output:

```<code>+#####+
|
|
+#####+
|
|
+#####+
</code>```

Input: 8,3,+,|,#

Output:

```<code>+######+
|
|
|
+######+
|
|
|
+######+
</code>```

Input: 8,3,+,@,#

Output:

```<code>+######+
@
@
@
+######+
@
@
@
+######+
</code>```

Input: 9,4,^,$,!

Output:

```<code>^!!!!!!!^
$
$
$
$
^!!!!!!!^
$
$
$
$
^!!!!!!!^
</code>```

Cheating and standard loopholes are not allowed.

Your code must not print anything to STDERR.

Your code may accept any character encoding you choose as the input, but any character encoding you choose must, as a minimum, support all the 95 printable ASCII characters.

The shortest code, in bytes, that completes this challenge successfully, is the winning code.

Leaderboard

var QUESTION_ID=92138,OVERRIDE_USER=58717;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="
"+e.body.replace(OVERRIDE_REG,"")+"
")});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;/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;```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}</code>```

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

```

Body:
Pyke, <s>16</s> 15 bytes

*2mtz:zn+Q*' +D

Try it here!


答:
V, 18 bytes

```<code>älJxxÀPjddÀpkäGYGp
</code>```

Try it online!

Title: The Letter E with E

Body:
V, 18 bytes

älJxxÀPjddÀpkäGYGp

Try it online!


问:
Invalid Invali Inval
This idea is loosely based upon @TùxCräftîñg's chat message.

Take a look at the below example sequence:

INVALID0, INVALID1, INVALID2 INVALID3, INVALID4... INVALID9

After INVALID9, it goes on like this:

INVALI0, INVALI1, INVALI2, INVALI3... INVALI9

And after INVALI9, it's like this:

INVAL0,INVAL1, INVAL2, INVAL3... INVAL9

After, INVAL9, it's like this:

INVA0, INVA1, INVA2, INVA3, ... INVA9

Notice how we we kept removing a letter from the word INVALID each time.

You'll keep repeating this until you reach a single letter, that is, the letter I:

I0, I1, I2, I3, I4 ... I9

Now, your task is, to take an input of a word, and produce a sequence from it like the above example. Your code must also work with single letters, and in that case the resulting sequence will be shorter.

You may choose any input and output format that you prefer (with or without a separator, as you wish), but you must specify which one you have chosen.

The sequence needs to be in the exact specified order.

The shortest code, in bytes, that successfully completes this challenge, wins the challenge.

Full sequence in the above example:

```<code>INVALID0, INVALID1, INVALID2, INVALID3, INVALID4, INVALID5, INVALID6, INVALID7, INVALID8, INVALID9, INVALI0, INVALI1, INVALI2, INVALI3, INVALI4, INVALI5, INVALI6, INVALI7, INVALI8, INVALI9, INVAL0, INVAL1, INVAL2, INVAL3, INVAL4, INVAL5, INVAL6, INVAL7, INVAL8, INVAL9, INVA0, INVA1, INVA2, INVA3, INVA4, INVA5, INVA6, INVA7, INVA8, INVA9, INV0, INV1, INV2, INV3, INV4, INV5, INV6, INV7, INV8, INV9, IN0, IN1, IN2, IN3, IN4, IN5, IN6, IN7, IN8, IN9, I0, I1, I2, I3, I4, I5, I6, I7, I8, I9
</code>```

Other examples:

Input: MAYBE (Uppercase and lowercase don't matter)

Output:

```<code>MAYBE0, MAYBE1, MAYBE2, MAYBE3, MAYBE4, MAYBE5, MAYBE6, MAYBE7, MAYBE8, MAYBE9, MAYB0, MAYB1, MAYB2, MAYB3, MAYB4, MAYB5, MAYB6, MAYB7, MAYB8, MAYB9, MAY0, MAY1, MAY2, MAY3, MAY4, MAY5, MAY6, MAY7, MAY8, MAY9, MA0, MA1, MA2, MA3, MA4, MA5, MA6, MA7, MA8, MA9, M0, M1, M2, M3, M4, M5, M6, M7, M8, M9
</code>```

Input: AFTER

Output:

```<code>AFTER0, AFTER1, AFTER2, AFTER3, AFTER4, AFTER5, AFTER6, AFTER7, AFTER8, AFTER9, AFTE0, AFTE1, AFTE2, AFTE3, AFTE4, AFTE5, AFTE6, AFTE7, AFTE8, AFTE9, AFT0, AFT1, AFT2, AFT3, AFT4, AFT5, AFT6, AFT7, AFT8, AFT9, AF0, AF1, AF2, AF3, AF4, AF5, AF6, AF7, AF8, AF9, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9
</code>```

Input: WHAT ARE YOU DOING

```<code>WHAT ARE YOU DOING0, WHAT ARE YOU DOING1, WHAT ARE YOU DOING2, WHAT ARE YOU DOING3, WHAT ARE YOU DOING4, WHAT ARE YOU DOING5, WHAT ARE YOU DOING6, WHAT ARE YOU DOING7, WHAT ARE YOU DOING8, WHAT ARE YOU DOING9, WHAT ARE YOU DOIN0, WHAT ARE YOU DOIN1, WHAT ARE YOU DOIN2, WHAT ARE YOU DOIN3, WHAT ARE YOU DOIN4, WHAT ARE YOU DOIN5, WHAT ARE YOU DOIN6, WHAT ARE YOU DOIN7, WHAT ARE YOU DOIN8, WHAT ARE YOU DOIN9, WHAT ARE YOU DOI0, WHAT ARE YOU DOI1, WHAT ARE YOU DOI2, WHAT ARE YOU DOI3, WHAT ARE YOU DOI4, WHAT ARE YOU DOI5, WHAT ARE YOU DOI6, WHAT ARE YOU DOI7, WHAT ARE YOU DOI8, WHAT ARE YOU DOI9, WHAT ARE YOU DO0, WHAT ARE YOU DO1, WHAT ARE YOU DO2, WHAT ARE YOU DO3, WHAT ARE YOU DO4, WHAT ARE YOU DO5, WHAT ARE YOU DO6, WHAT ARE YOU DO7, WHAT ARE YOU DO8, WHAT ARE YOU DO9, WHAT ARE YOU D0, WHAT ARE YOU D1, WHAT ARE YOU D2, WHAT ARE YOU D3, WHAT ARE YOU D4, WHAT ARE YOU D5, WHAT ARE YOU D6, WHAT ARE YOU D7, WHAT ARE YOU D8, WHAT ARE YOU D9, WHAT ARE YOU 0, WHAT ARE YOU 1, WHAT ARE YOU 2, WHAT ARE YOU 3, WHAT ARE YOU 4, WHAT ARE YOU 5, WHAT ARE YOU 6, WHAT ARE YOU 7, WHAT ARE YOU 8, WHAT ARE YOU 9, WHAT ARE YOU0, WHAT ARE YOU1, WHAT ARE YOU2, WHAT ARE YOU3, WHAT ARE YOU4, WHAT ARE YOU5, WHAT ARE YOU6, WHAT ARE YOU7, WHAT ARE YOU8, WHAT ARE YOU9, WHAT ARE YO0, WHAT ARE YO1, WHAT ARE YO2, WHAT ARE YO3, WHAT ARE YO4, WHAT ARE YO5, WHAT ARE YO6, WHAT ARE YO7, WHAT ARE YO8, WHAT ARE YO9, WHAT ARE Y0, WHAT ARE Y1, WHAT ARE Y2, WHAT ARE Y3, WHAT ARE Y4, WHAT ARE Y5, WHAT ARE Y6, WHAT ARE Y7, WHAT ARE Y8, WHAT ARE Y9, WHAT ARE 0, WHAT ARE 1, WHAT ARE 2, WHAT ARE 3, WHAT ARE 4, WHAT ARE 5, WHAT ARE 6, WHAT ARE 7, WHAT ARE 8, WHAT ARE 9, WHAT ARE0, WHAT ARE1, WHAT ARE2, WHAT ARE3, WHAT ARE4, WHAT ARE5, WHAT ARE6, WHAT ARE7, WHAT ARE8, WHAT ARE9, WHAT AR0, WHAT AR1, WHAT AR2, WHAT AR3, WHAT AR4, WHAT AR5, WHAT AR6, WHAT AR7, WHAT AR8, WHAT AR9, WHAT A0, WHAT A1, WHAT A2, WHAT A3, WHAT A4, WHAT A5, WHAT A6, WHAT A7, WHAT A8, WHAT A9, WHAT 0, WHAT 1, WHAT 2, WHAT 3, WHAT 4, WHAT 5, WHAT 6, WHAT 7, WHAT 8, WHAT 9, WHAT0, WHAT1, WHAT2, WHAT3, WHAT4, WHAT5, WHAT6, WHAT7, WHAT8, WHAT9, WHA0, WHA1, WHA2, WHA3, WHA4, WHA5, WHA6, WHA7, WHA8, WHA9, WH0, WH1, WH2, WH3, WH4, WH5, WH6, WH7, WH8, WH9, W0, W1, W2, W3, W4, W5, W6, W7, W8, W9
</code>```

Leaderboard

var QUESTION_ID=92156,OVERRIDE_USER=58717;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="
"+e.body.replace(OVERRIDE_REG,"")+"
")});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;/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;```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}</code>```

 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

```

答:
05AB1E, <s>10</s> 8 bytes

```<code>.pžmâ€JR
</code>```

Explanation

```<code>.p        # get prefixes of input
  žmâ     # cartesian product with [9..0]
     €J   # join each
       R  # reverse
</code>```

Try it online!

Saved 2 bytes thanks to Adnan

Title: Invalid Invali Inval

Body:
05AB1E, <s>10</s> 8 bytes

.pžmâ€JR

Explanation

.p        # get prefixes of input
  žmâ     # cartesian product with [9..0]
     €J   # join each
       R  # reverse

Try it online!

Saved 2 bytes thanks to Adnan


问:
Mirror, Mirror, in the Code
Two-dimensional programming languages often have mirror commands like / and \ to redirect the instruction pointer on the grid:

```<code>>>>>\
    v
    v
<<<</
</code>```

In this challenge, you're given an incoming direction and a mirror and you need to determine the outgoing direction.

Rules

The incoming direction will be given as one of the characters NESW and the mirror will be given as either / or \. You may receive these in any order. You must use uppercase letters.

You may take input in any convenient format, including a two-character string, a string using some separator between the characters, a pair of characters in a list, or even a pair of singleton strings. If you do use a string with separator, the separator cannot use any of the characters NWSE\/.

Output should be a character from NESW or single-character string.

You may write a program or a function and use any of the our standard methods of receiving input and providing output.

You may use any programming language, but note that these loopholes are forbidden by default.

This is code-golf, so the shortest valid answer – measured in bytes – wins.

Test Cases

There are only 8 possible inputs you need to handle, so there is no excuse for not testing your code on all of them:

```<code>N /   -->   W
N \   -->   E
E /   -->   S
E \   -->   N
S /   -->   E
S \   -->   W
W /   -->   N
W \   -->   S
</code>```

答:
Pyth, 13 bytes

```<code>@."EW¹0`Y"sCM
</code>```

Test suite

Sum the code points, modular index, compressed string.

Title: Mirror, Mirror, in the Code

Body:
Pyth, 13 bytes

@."EW¹0`Y"sCM

Test suite

Sum the code points, modular index, compressed string.


问:
Count from 1 to 100... in Roman Numerals
Write a program that count from 1 to 100 in Roman Numerals and print these numbers by standard output. Each one of the numbers must be separated by spaces.

You cannot use any built in function to transform to roman numerals nor external application or library to do so.

The desired result is

```<code>I II III IV V VI VII VIII IX X XI XII XIII XIV XV XVI XVII XVIII XIX XX XXI XXII XXIII XXIV XXV XXVI XXVII XXVIII XXIX XXX XXXI XXXII XXXIII XXXIV XXXV XXXVI XXXVII XXXVIII XXXIX XL XLI XLII XLIII XLIV XLV XLVI XLVII XLVIII XLIX L LI LII LIII LIV LV LVI LVII LVIII LIX LX LXI LXII LXIII LXIV LXV LXVI LXVII LXVIII LXIX LXX LXXI LXXII LXXIII LXXIV LXXV LXXVI LXXVII LXXVIII LXXIX LXXX LXXXI LXXXII LXXXIII LXXXIV LXXXV LXXXVI LXXXVII LXXXVIII LXXXIX XC XCI XCII XCIII XCIV XCV XCVI XCVII XCVIII XCIX C
</code>```

As it is a code golf challenge, shortest code wins.

答:
MUMPS 184

```<code>S V(100)="C",V(90)="XC",V(50)="L",V(40)="XL",V(10)="X",V(9)="IX",V(5)="V",V(4)="IV",V(1)="I" F I=1:1:100 S S=I,N="" F  Q:'S  S N=$O(V(N),-1) I S&(S'<N ) S S=S-N W V(N) S N="" w:'S " "
</code>```

Same algorithm as @cardboard_box, from whom I've taken the explanation verbatim -

Explanation

Using these values, take the largest value not greater than n and subtract it from n.  Repeat until n is 0.

```<code>'C'  = 100
'XC' = 90
'L'  = 50
'XL' = 40
'X'  = 10
'IX' = 9
'V'  = 5
'IV' = 4
'I'  = 1
</code>```

Body:
MUMPS 184

S V(100)="C",V(90)="XC",V(50)="L",V(40)="XL",V(10)="X",V(9)="IX",V(5)="V",V(4)="IV",V(1)="I" F I=1:1:100 S S=I,N="" F  Q:'S  S N=$O(V(N),-1) I S&(S'<N ) S S=S-N W V(N) S N="" w:'S " "

Same algorithm as @cardboard_box, from whom I've taken the explanation verbatim -

Explanation

Using these values, take the largest value not greater than n and subtract it from n.  Repeat until n is 0.

'C'  = 100
'XC' = 90
'L'  = 50
'XL' = 40
'X'  = 10
'IX' = 9
'V'  = 5
'IV' = 4
'I'  = 1