Title: Snakes all around

Body:
K, 17 Bytes

{,[x#"=";"(:)-"]}

Example;

f:{,[x#"=";"(:)-"]}
-1(f'!10);          /print out the result of calling f where x is 0 1 2 3 4 5....
(:)-
=(:)-
==(:)-
===(:)-
====(:)-
=====(:)-
======(:)-
=======(:)-
========(:)-
=========(:)-

Explanation;

{}                 /function x is implicit and is an int
x#"="              /take (#) x of "=" --> so 3#"=" gives "==="
,[x#"=";"(:)-"]    /comma is a join that takes 2 args --> ,[x;y] gives the concatination of x and y --> "a","abc" is the same as ,["a";"abc"] and gives "aabc"


问:
Snakes all around

Challenge

The challenge is simple: print a snake.

You will get the length of the snake as input.

A snake of length 2 looks like this:

```<code>==(:)-
</code>```

A snake of length 7 looks like this:

```<code>=======(:)-
</code>```

In other words, the length of a snake is how many equal signs are before the head.

Usage

Let's say I made a C++ implementation and compiled it to ./getsnake.

I could run it like so:

```<code>$ ./getsnake 10
==========(:)-
</code>```

Clarifications

Standard loopholes are disallowed.

You can get input and output in any acceptable way.

You can assume all inputs given are positive integers.

You may write a function instead of a regular program.

答:
><>, <s>26</s> 23 bytes

```<code>:?!v"="o1-
oo;>"-):("oo
</code>```

-3 bytes thanks to Leaky Nun

Test it here. (you have to input the code manually)

ContentLicense: CC BY-SA 3.0

Title: Snakes all around

Body:
><>, <s>26</s> 23 bytes

:?!v"="o1-
oo;>"-):("oo

-3 bytes thanks to Leaky Nun

Test it here. (you have to input the code manually)


Title: Snakes all around

Body:
Challenge

The challenge is simple: print a snake.

You will get the length of the snake as input.

A snake of length 2 looks like this:

```<code>==(:)-
</code>```

A snake of length 7 looks like this:

```<code>=======(:)-
</code>```

In other words, the length of a snake is how many equal signs are before the head.

Usage

Let's say I made a C++ implementation and compiled it to ./getsnake.

I could run it like so:

```<code>$ ./getsnake 10
==========(:)-
</code>```

Clarifications

Standard loopholes are disallowed.

You can get input and output in any acceptable way.

You can assume all inputs given are positive integers.

You may write a function instead of a regular program.

Body:
Perl, 16 + 1 (-p flag) = 17 bytes

$_="="x$_."(:)-"

Needs -p flag, so run with :

perl -pe '$_="="x$_."(:)-"'


答:
Minkolang 0.15, 12 bytes

```<code>"=(:)-"nD$O.
</code>```

Try it here!

Explanation

```<code>"=(:)-"         Push this to the stack in reverse order - ["-",")",":","(","="]
       n        Take number from input
        D       Pop k and duplicate top of stack (the "=") k times
         $O.    Output whole stack as characters and stop.
</code>```

Title: Snakes all around

Body:
Minkolang 0.15, 12 bytes

"=(:)-"nD$O.

Try it here!

Explanation

"=(:)-"         Push this to the stack in reverse order - ["-",")",":","(","="]
       n        Take number from input
        D       Pop k and duplicate top of stack (the "=") k times
         $O.    Output whole stack as characters and stop.


答:
Java, 133 bytes

```<code>public class Snake {
    public void s(int n){
        for(int i=0;i<n;i++){
            System.out.print("=");
        }
        System.out.println("(:)-");
    }
}
</code>```

Title: Snakes all around

Body:
Java, 133 bytes

public class Snake {
    public void s(int n){
        for(int i=0;i<n;i++){
            System.out.print("=");
        }
        System.out.println("(:)-");
    }
}


答:
Bash, <s>52</s> 36 bytes

<s>

```<code>while [[ ${#a} -lt $1 ]];do a=$a=;done;echo "$a(:)~"
</code>```

</s>

```<code>printf -vs %$1s;echo "${s// /=}(:)~"
</code>```

Excellent suggestion by @manatwork.

If one would like to use external programs (sed) this could be a bit smaller(31 bytes):

```<code>printf "%$1s(:)~"|sed 's/ /=/g'
</code>```

Run like that:

```<code>$ bash snake.sh 1
=(:)~
$ bash snake.sh 3
===(:)~
</code>```

Title: Snakes all around

Body:
Bash, <s>52</s> 36 bytes

<s>

while [[ ${#a} -lt $1 ]];do a=$a=;done;echo "$a(:)~"

</s>

printf -vs %$1s;echo "${s// /=}(:)~"

Excellent suggestion by @manatwork.

If one would like to use external programs (sed) this could be a bit smaller(31 bytes):

printf "%$1s(:)~"|sed 's/ /=/g'

Run like that:

$ bash snake.sh 1
=(:)~
$ bash snake.sh 3
===(:)~


问:
Print this diamond
This question has been spreading like a virus in my office. There are quite a variety of approaches:

Print the following:

```<code>        1
       121
      12321
     1234321
    123454321
   12345654321
  1234567654321
 123456787654321
12345678987654321
 123456787654321
  1234567654321
   12345654321
    123454321
     1234321
      12321
       121
        1
</code>```

Answers are scored in characters with fewer characters being better.

答:
Ruby, <s>76</s> <s>69</s> <s>60</s> 54 characters

```<code>(-8..8).map{i=_1.abs;puts' '*i+"#{eval(?1*(9-i))**2}"}
</code>```

(Thanks, Patrick, G B, and Slim Liser!)

Improvements welcome. :)

ContentLicense: CC BY-SA 4.0

Title: Print this diamond

Body:
Ruby, <s>76</s> <s>69</s> <s>60</s> 54 characters

(-8..8).map{i=_1.abs;puts' '*i+"#{eval(?1*(9-i))**2}"}

(Thanks, Patrick, G B, and Slim Liser!)

Improvements welcome. :)


答:
CJam, <s>13</s> 11 bytes

```<code>qi'=*"(:)-"
</code>```

Test it here.

-2 bytes thanks to quartata

Title: Snakes all around

Body:
CJam, <s>13</s> 11 bytes

qi'=*"(:)-"

Test it here.

-2 bytes thanks to quartata


答:
Befunge-98, 24 bytes

Takes numerical input from the user, then prints the snake.

```<code>'=&:00pk:00gk,"-):("4k,@
</code>```

Title: Snakes all around

Body:
Befunge-98, 24 bytes

Takes numerical input from the user, then prints the snake.

'=&:00pk:00gk,"-):("4k,@


答:
Java 8, 52 bytes

n->new String(new char[n]).replace("\0","=")+"(:)-";
```

<p>Test suite. (Compile > Execute)</p>

<p>Credits.</p>

<h3>teh traditional way, <s>61</s> <s>54</s> 53 bytes</h3>

<p><strong>7 bytes thanks to Kevin Cruijssen.</strong></p>

<p><strong>1 byte thanks to Dom Hastings.</strong></p>

<pre class="lang-java prettyprint-override"><code>n->{String s="";for(;n-->0;)s+="=";return s+"(:)-";};
</code>```

Title: Snakes all around

Body:
Java 8, 52 bytes

n->new String(new char[n]).replace("\0","=")+"(:)-";

Test suite. (Compile > Execute)

Credits.

teh traditional way, <s>61</s> <s>54</s> 53 bytes

7 bytes thanks to Kevin Cruijssen.

1 byte thanks to Dom Hastings.

n->{String s="";for(;n-->0;)s+="=";return s+"(:)-";};


答:
Retina, 10 bytes

```<code>.+
$*=(:)-
</code>```

Try it online!

This is a simple regex substitution.

It matches .+ which matches the whole input, and then substitutes it with $*=(;)-.

The $* is a feature unique in Retina: it is the character-repetition special operator.

For example, 5$*x would become xxxxx.

In the case that the previous argument is absent, the whole match is used as the default argument.

Title: Snakes all around

Body:
Retina, 10 bytes

.+
$*=(:)-

Try it online!

This is a simple regex substitution.

It matches .+ which matches the whole input, and then substitutes it with $*=(;)-.

The $* is a feature unique in Retina: it is the character-repetition special operator.

For example, 5$*x would become xxxxx.

In the case that the previous argument is absent, the whole match is used as the default argument.


答:
Mathematica, <s>21</s> 20 bytes

```<code>"="~Table~#<>"(:)-"&
</code>```

Anonymous function. Takes a number n as input, and returns a snake of length n as output. "="~Table~# generates a list {"=", "=", ..., "="} of length n, and <>"(:)-" concatenates the list's elements and appends "(:)-" to the resulting string.

Title: Snakes all around

Body:
Mathematica, <s>21</s> 20 bytes

"="~Table~#<>"(:)-"&

Anonymous function. Takes a number n as input, and returns a snake of length n as output. "="~Table~# generates a list {"=", "=", ..., "="} of length n, and <>"(:)-" concatenates the list's elements and appends "(:)-" to the resulting string.


问:
Cooke and Wheatstone telegraph, five-needle

Definition

According to Wikipedia:

The Cooke and Wheatstone telegraph was an early electrical telegraph system dating from the 1830s invented by English inventor William Fothergill Cooke and English scientist Charles Wheatstone. It was the first telegraph system to be put into commercial service. The receiver consisted of a number of needles which could be moved by electromagnetic coils to point to letters on a board. This feature was liked by early users who were unwilling to learn codes, and employers who did not want to invest in staff training.

It works like this:

In the middle are five needles, which can be deflected clockwise (as is the case of the middle needle) or anti-clockwise (as is the case of the last needle).

In the picture above, the two deflected needles point to the letter G, which means that the letter being transmitted/received is the letter G.

Note that the letters C, J, Q, V, X, Z are missing and thus have to be substituted with other letters.

Task

You will receive a character in ABDEFGHIKLMNOPRSTUWY as input, and you will output the corresponding configuration of the five needles, with undeflected as |, deflected clockwise as /, and deflected anti-clockwise as \.

Testcases

This covers all the possible inputs

```<code>input output
A     /|||\
B     /||\|
D     |/||\
E     /|\||
F     |/|\|
G     ||/|\  (explanation: see above)
H     /\|||
I     |/\||
K     ||/\|
L     |||/\
M     \/|||
N     |\/||
O     ||\/|
P     |||\/
R     \|/||
S     |\|/|
T     ||\|/
U     \||/|
W     |\||/
Y     \|||/
</code>```

Rules/Requirements

Each submission should be either a full program or function. If it is a function, it must be runnable by only needing to add the function call to the bottom of the program. Anything else (e.g. headers in C), must be included.

If it is possible, provide a link to a site where your program can be tested.

Your program must not write anything to STDERR.

Standard Loopholes are forbidden.

Your program can output in any case, but it must be printed (not an array or similar).

Scoring

Programs are scored according to bytes, in UTF-8 by default or a different character set of your choice.

Eventually, the answer with the least bytes will win.

Submissions

To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:

```<code># Language Name, N bytes
</code>```

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

```<code># Ruby, <s>104</s> <s>101</s> 96 bytes
</code>```

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:

```<code># Perl, 43 + 2 (-p flag) = 45 bytes
</code>```

You can also make the language name a link which will then show up in the leaderboard snippet:

```<code># [><>](http://esolangs.org/wiki/Fish), 121 bytes
</code>```

Leaderboard

Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.

/* Configuration */

var QUESTION_ID = 87104; // Obtain this from the url
// It will be like https://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 48934; // This should be the user ID of the challenge author.

/* App */

var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page;

function answersUrl(index) {
  return "https://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

function commentUrl(index, answers) {
  return "https://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}

function getAnswers() {
  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });
}

function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      data.items.forEach(function(c) {
        if (c.owner.user_id === OVERRIDE_USER)
          answers_hash[c.post_id].comments.push(c);
      });
      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });
}

getAnswers();

var SCORE_REG = /<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;

var OVERRIDE_REG = /^Override\s*header:\s*/i;

function getAuthorName(a) {
  return a.owner.display_name;
}

function process() {
  var valid = [];

  answers.forEach(function(a) {
    var body = a.body;
    a.comments.forEach(function(c) {
      if(OVERRIDE_REG.test(c.body))
        body = '
' + c.body.replace(OVERRIDE_REG, '') + '
';
    });

    var match = body.match(SCORE_REG);
    if (match)
      valid.push({
        user: getAuthorName(a),
        size: +match[2],
        language: match[1],
        link: a.share_link,
      });

  });

  valid.sort(function (a, b) {
    var aB = a.size,
        bB = b.size;
    return aB - bB
  });

  var languages = {};
  var place = 1;
  var lastSize = null;
  var lastPlace = 1;
  valid.forEach(function (a) {
    if (a.size != lastSize)
      lastPlace = place;
    lastSize = a.size;
    ++place;

    var answer = jQuery("#answer-template").html();
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
                   .replace("{{NAME}}", a.user)
                   .replace("{{LANGUAGE}}", a.language)
                   .replace("{{SIZE}}", a.size)
                   .replace("{{LINK}}", a.link);
    answer = jQuery(answer);
    jQuery("#answers").append(answer);

    var lang = a.language;
    if (/ b.lang) return 1;
    if (a.lang < b.lang) return -1;
    return 0;
  });

  for (var i = 0; i < langs.length; ++i)
  {
    var language = jQuery("#language-template").html();
    var lang = langs[i];
    language = language.replace("{{LANGUAGE}}", lang.lang)
                       .replace("{{NAME}}", lang.user)
                       .replace("{{SIZE}}", lang.size)
                       .replace("{{LINK}}", lang.link);
    language = jQuery(language);
    jQuery("#languages").append(language);
  }

}```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body { text-align: left !important}

#answer-list {
  padding: 10px;
  width: 290px;
  float: left;
}

#language-list {
  padding: 10px;
  width: 290px;
  float: left;
}

table thead {
  font-weight: bold;
}

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>37</s> 34 bytes

Code:

```<code>"/\|||"œ€JÙ•3wxìeNðƒ2xGÑäß•36BIk<è
</code>```

Uses the CP-1252 encoding. Try it online!.

Body:
05AB1E, <s>37</s> 34 bytes

Code:

"/\|||"œ€JÙ•3wxìeNðƒ2xGÑäß•36BIk<è

Uses the CP-1252 encoding. Try it online!.


答:
Javascript (using external library) (39 bytes)

```<code>n=>_.Range(0,n).Write("=",x=>"")+"(:)-"
</code>```

Link to lib: https://github.com/mvegh1/Enumerable

Code explanation: Create an array of n elements, and Write a concatenated string with "=" as the delimiter and an empty string as the current element. Then concatenate the head of the snake

Title: Snakes all around

Body:
Javascript (using external library) (39 bytes)

n=>_.Range(0,n).Write("=",x=>"")+"(:)-"

Link to lib: https://github.com/mvegh1/Enumerable

Code explanation: Create an array of n elements, and Write a concatenated string with "=" as the delimiter and an empty string as the current element. Then concatenate the head of the snake


答:
Hexagony, 33 bytes

Not gonna win, but still cool. Might be able to get golfed more.

Try it online!

Golfed:

```<code>61}?.$)@$j;(3<./;.}l/.400;5\j;.'\
</code>```

Formatted:

```<code>    6 1 } ?
   . $ ) @ $
  j ; ( 3 < .
 / ; . } l / .
  4 0 0 ; 5 \
   j ; . ' \
    . . . .
</code>```

Colored (Made using Timwi's Hexagony Colorer)

Explanation:

Loop, print out "=" until the counter reaches 0.

```<code>    6 1 } ?
   . $ . . $
  . . ( . . .
 / . . } . . .
  . . . ; . .
   . . . ' .
    . . . .
</code>```

Print "("

```<code>    . . . .
   . . . . .
  . . . . . .
 / ; . . . . .
  4 . . . . .
   j . . . .
    . . . .
</code>```

Print ":"

```<code>    . . . .
   . . . . .
  . ; ( 3 < .
 . . . } l / .
  . . . . . .
   . . . . .
    . . . .
</code>```

Print ")"

```<code>    . . . .
   . . . . .
  j . . . . .
 . . . . . . .
  . . . ; 5 \
   . . . . \
    . . . .
</code>```

The above values were generated using a simple python script. However, I kind of ran out of room for the "-". So, I had to resort to more advanced tricks.

When the program prints out ")", the value of the cell isn't 41, it's 1065. Hexagony just mods the value when printing. As it turns out, (1065*1000+4)%256=44, just one away from 45, the ascii value for "-". Then, I just increment, print, and insert a @ somewhere after printing.

```<code>    . . . .
   . $ ) @ $
  j . . 3 . .
 / . . } . . .
  4 0 0 . 5 \
   . ; . . \
    . . . .
</code>```

Title: Snakes all around

Body:
Hexagony, 33 bytes

Not gonna win, but still cool. Might be able to get golfed more.

Try it online!

Golfed:

61}?.$)@$j;(3<./;.}l/.400;5\j;.'\

Formatted:

    6 1 } ?
   . $ ) @ $
  j ; ( 3 < .
 / ; . } l / .
  4 0 0 ; 5 \
   j ; . ' \
    . . . .

Colored (Made using Timwi's Hexagony Colorer)

Explanation:

Loop, print out "=" until the counter reaches 0.

    6 1 } ?
   . $ . . $
  . . ( . . .
 / . . } . . .
  . . . ; . .
   . . . ' .
    . . . .

Print "("

    . . . .
   . . . . .
  . . . . . .
 / ; . . . . .
  4 . . . . .
   j . . . .
    . . . .

Print ":"

    . . . .
   . . . . .
  . ; ( 3 < .
 . . . } l / .
  . . . . . .
   . . . . .
    . . . .

Print ")"

    . . . .
   . . . . .
  j . . . . .
 . . . . . . .
  . . . ; 5 \
   . . . . \
    . . . .

The above values were generated using a simple python script. However, I kind of ran out of room for the "-". So, I had to resort to more advanced tricks.

When the program prints out ")", the value of the cell isn't 41, it's 1065. Hexagony just mods the value when printing. As it turns out, (1065*1000+4)%256=44, just one away from 45, the ascii value for "-". Then, I just increment, print, and insert a @ somewhere after printing.

    . . . .
   . $ ) @ $
  j . . 3 . .
 / . . } . . .
  4 0 0 . 5 \
   . ; . . \
    . . . .


问:
Print a Tabula Recta!
The Tabula Recta (sometimes called a 'Vigenere Table'), was created by Johannes Trithemius, and has been used in several ciphers, including all variants of Bellaso's Vigenere cipher and the Trithemius cipher. It looks like this:

```<code>ABCDEFGHIJKLMNOPQRSTUVWXYZ
BCDEFGHIJKLMNOPQRSTUVWXYZA
CDEFGHIJKLMNOPQRSTUVWXYZAB
DEFGHIJKLMNOPQRSTUVWXYZABC
EFGHIJKLMNOPQRSTUVWXYZABCD
FGHIJKLMNOPQRSTUVWXYZABCDE
GHIJKLMNOPQRSTUVWXYZABCDEF
HIJKLMNOPQRSTUVWXYZABCDEFG
IJKLMNOPQRSTUVWXYZABCDEFGH
JKLMNOPQRSTUVWXYZABCDEFGHI
KLMNOPQRSTUVWXYZABCDEFGHIJ
LMNOPQRSTUVWXYZABCDEFGHIJK
MNOPQRSTUVWXYZABCDEFGHIJKL
NOPQRSTUVWXYZABCDEFGHIJKLM
OPQRSTUVWXYZABCDEFGHIJKLMN
PQRSTUVWXYZABCDEFGHIJKLMNO
QRSTUVWXYZABCDEFGHIJKLMNOP
RSTUVWXYZABCDEFGHIJKLMNOPQ
STUVWXYZABCDEFGHIJKLMNOPQR
TUVWXYZABCDEFGHIJKLMNOPQRS
UVWXYZABCDEFGHIJKLMNOPQRST
VWXYZABCDEFGHIJKLMNOPQRSTU
WXYZABCDEFGHIJKLMNOPQRSTUV
XYZABCDEFGHIJKLMNOPQRSTUVW
YZABCDEFGHIJKLMNOPQRSTUVWX
ZABCDEFGHIJKLMNOPQRSTUVWXY
</code>```

I frequently need this, but can't find it anywhere on the internet to copy and paste from. Because the square table is so long, and takes frigging ages to type, your code must be as short as possible.

Rules/Requirements

Each submission should be either a full program or function. If it is a function, it must be runnable by only needing to add the function call to the bottom of the program. Anything else (e.g. headers in C), must be included.

If it is possible, provide a link to a site where your program can be tested.

Your program must not write anything to STDERR.

Standard Loopholes are forbidden.

Your program can output in any case, but it must be printed (not an array or similar).

Scoring

Programs are scored according to bytes, in UTF-8 by default or a different character set of your choice.

Eventually, the answer with the least bytes will win.

Submissions

To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:

```<code># Language Name, N bytes
</code>```

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

```<code># Ruby, <s>104</s> <s>101</s> 96 bytes
</code>```

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:

```<code># Perl, 43 + 2 (-p flag) = 45 bytes
</code>```

You can also make the language name a link which will then show up in the leaderboard snippet:

```<code># [><>](http://esolangs.org/wiki/Fish), 121 bytes
</code>```

Leaderboard

Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.

/* Configuration */

var QUESTION_ID = 86986; // Obtain this from the url
// It will be like https://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 53406; // This should be the user ID of the challenge author.

/* App */

var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page;

function answersUrl(index) {
  return "https://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

function commentUrl(index, answers) {
  return "https://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}

function getAnswers() {
  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });
}

function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      data.items.forEach(function(c) {
        if (c.owner.user_id === OVERRIDE_USER)
          answers_hash[c.post_id].comments.push(c);
      });
      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });
}

getAnswers();

var SCORE_REG = /<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;

var OVERRIDE_REG = /^Override\s*header:\s*/i;

function getAuthorName(a) {
  return a.owner.display_name;
}

function process() {
  var valid = [];

  answers.forEach(function(a) {
    var body = a.body;
    a.comments.forEach(function(c) {
      if(OVERRIDE_REG.test(c.body))
        body = '
' + c.body.replace(OVERRIDE_REG, '') + '
';
    });

    var match = body.match(SCORE_REG);
    if (match)
      valid.push({
        user: getAuthorName(a),
        size: +match[2],
        language: match[1],
        link: a.share_link,
      });

  });

  valid.sort(function (a, b) {
    var aB = a.size,
        bB = b.size;
    return aB - bB
  });

  var languages = {};
  var place = 1;
  var lastSize = null;
  var lastPlace = 1;
  valid.forEach(function (a) {
    if (a.size != lastSize)
      lastPlace = place;
    lastSize = a.size;
    ++place;

    var answer = jQuery("#answer-template").html();
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
                   .replace("{{NAME}}", a.user)
                   .replace("{{LANGUAGE}}", a.language)
                   .replace("{{SIZE}}", a.size)
                   .replace("{{LINK}}", a.link);
    answer = jQuery(answer);
    jQuery("#answers").append(answer);

    var lang = a.language;
    if (/ b.lang) return 1;
    if (a.lang < b.lang) return -1;
    return 0;
  });

  for (var i = 0; i < langs.length; ++i)
  {
    var language = jQuery("#language-template").html();
    var lang = langs[i];
    language = language.replace("{{LANGUAGE}}", lang.lang)
                       .replace("{{NAME}}", lang.user)
                       .replace("{{SIZE}}", lang.size)
                       .replace("{{LINK}}", lang.link);
    language = jQuery(language);
    jQuery("#languages").append(language);
  }

}```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body { text-align: left !important}

#answer-list {
  padding: 10px;
  width: 290px;
  float: left;
}

#language-list {
  padding: 10px;
  width: 290px;
  float: left;
}

table thead {
  font-weight: bold;
}

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

```

答:
Batch, 94 bytes

```<code>@set a=ABCDEFGHIJKLMNOPQRSTUVWXYZ
@for /l %%i in (0,1,25)do @call echo %%a:~%%i%%%%a:~0,%%i%%
</code>```

Title: Print a Tabula Recta!

Body:
Batch, 94 bytes

@set a=ABCDEFGHIJKLMNOPQRSTUVWXYZ
@for /l %%i in (0,1,25)do @call echo %%a:~%%i%%%%a:~0,%%i%%


答:
JAISBaL, 9 bytes

```<code>t=*Qb(:)-
</code>```

Verbose:

```<code># \# enable verbose parsing #\
push1 =        \# push = onto the stack #\
mul            \# multiply the top two values of the stack #\
popout         \# pop the top value of a stack and print it #\
print4 (:)-    \# print (:)- #\
</code>```

Tested with JAISBaL-0.0.7
(The compiled .jar was just pushed, but the source has been up on git for a while)

Title: Snakes all around

Body:
JAISBaL, 9 bytes

t=*Qb(:)-

Verbose:

# \# enable verbose parsing #\
push1 =        \# push = onto the stack #\
mul            \# multiply the top two values of the stack #\
popout         \# pop the top value of a stack and print it #\
print4 (:)-    \# print (:)- #\

Tested with JAISBaL-0.0.7
(The compiled .jar was just pushed, but the source has been up on git for a while)


问:
Perform basic operations on complex numbers in a language without native support for complex numbers
Your code has to provide the following functions:

```<code>read(x)
</code>```

Reads a complex number from the standard input. It has to accept and evaluate something in the form of for example 1.42 + 3i.

```<code>print(x)
</code>```

Prints the complex number in the form of, for example 1.23 - 4.32i

```<code>add(x,y)
sub(x,y)
mult(x,y)
div(x,y)
</code>```

Adds, subtracts, multiplies and respectively divides the two complex numbers.

It is enough if your functions are accurate to two digits after the decimal point, of course, it can be more if you so wish. The input will never have more than two digits after the decimal point.

Any language without native support for complex numbers may be used. Similarly, libraries or other language features which deal with complex numbers are not permitted. The point is, you have to do all the handling of complex numbers by yourself.

Scoring

This is a code golf. The score is the sum of the lengths of the function bodies. For example, int add(int a, int b) {return a+b;} will have a length of 11 because of return a+b. Your solution must have a main program which demonstrates the use of the functions (for easier evaluation of your solution), but it will not be part of the scoring.

You can store the complex numbers in any way you wish, but the functions must have exactly the same amount of parameters as in the above description.

EDIT: For languages that support it, you can use operator overloading instead of the add, sub, etc. functions.

EDIT 2: To prohibit the cheap #define all_your_code_here A, I'll try to clarify the "only function bodies count" better: every character in the code counts, except for the overhead required to declare and define the functions and the libraries required to do basic I/O. By basic I/O I still mean no language features which directly deal with complex numbers. The main or equivalent where you call these functions don't count but you are not allowed to do anything besides using those functions for demonstrative purpose.

答:
Python, 131 chars

```<code>add=lambda (a,b),(c,d):(a+c,b+d)
sub=lambda (a,b),(c,d):(a-c,b-d)
mul=lambda (a,b),(c,d):(a*c-b*d,a*d+b*c)
def div(x,(c,d)):z=c**2+d**2;return mul(x,(c/z,-d/z))
def _print(x):print"%f+%fi"%x
read=lambda:tuple(map(float,raw_input()[:-1].split('+')))

x=read()
y=read()
_print(add(x,y))
_print(sub(x,y))
_print(mul(x,y))
_print(div(x,y))
</code>```

Makes lots of use of lambda unpacking, which I'm not including in my "body" count.  (I'm counting everything after the first :).  Kinda cheating, but I'm not really sure how to count it otherwise.

Body:
Python, 131 chars

add=lambda (a,b),(c,d):(a+c,b+d)
sub=lambda (a,b),(c,d):(a-c,b-d)
mul=lambda (a,b),(c,d):(a*c-b*d,a*d+b*c)
def div(x,(c,d)):z=c**2+d**2;return mul(x,(c/z,-d/z))
def _print(x):print"%f+%fi"%x
read=lambda:tuple(map(float,raw_input()[:-1].split('+')))

x=read()
y=read()
_print(add(x,y))
_print(sub(x,y))
_print(mul(x,y))
_print(div(x,y))

Makes lots of use of lambda unpacking, which I'm not including in my "body" count.  (I'm counting everything after the first :).  Kinda cheating, but I'm not really sure how to count it otherwise.


答:
JavaScript (ES6), <s>97</s> 89 bytes

```<code>c=>(n=`ABEHMDFINRGKOSULPTWY`.search(c),s=[...`|||||`],s[4-n%5]=`\\`,s[n>>2]=`/`,s.join``)
</code>```

Edit: Saved 3 bytes by switching to a lookup table that doesn't need padding. Saved 5 bytes by setting array elements instead of trying to edit a string.

Explanation: The table ABEHMDFINRGKOSULPTWY is organised so that if you split it into 5 groups of 4 adjacent letters then each letter in the group is on the same / slant in the diagram, while if you split it into 5 groups by taking the index modulo 5 then each letter in the group is on the same \ slant in the diagram. These latter groups are in reverse order but that's easily handled by subtracting from 4. (Arranging the table so that the former groups were in reverse order cost more to fix.)

Title: Cooke and Wheatstone telegraph, five-needle

Body:
Definition

According to Wikipedia:

The Cooke and Wheatstone telegraph was an early electrical telegraph system dating from the 1830s invented by English inventor William Fothergill Cooke and English scientist Charles Wheatstone. It was the first telegraph system to be put into commercial service. The receiver consisted of a number of needles which could be moved by electromagnetic coils to point to letters on a board. This feature was liked by early users who were unwilling to learn codes, and employers who did not want to invest in staff training.

It works like this:

In the middle are five needles, which can be deflected clockwise (as is the case of the middle needle) or anti-clockwise (as is the case of the last needle).

In the picture above, the two deflected needles point to the letter G, which means that the letter being transmitted/received is the letter G.

Note that the letters C, J, Q, V, X, Z are missing and thus have to be substituted with other letters.

Task

You will receive a character in ABDEFGHIKLMNOPRSTUWY as input, and you will output the corresponding configuration of the five needles, with undeflected as |, deflected clockwise as /, and deflected anti-clockwise as \.

Testcases

This covers all the possible inputs

```<code>input output
A     /|||\
B     /||\|
D     |/||\
E     /|\||
F     |/|\|
G     ||/|\  (explanation: see above)
H     /\|||
I     |/\||
K     ||/\|
L     |||/\
M     \/|||
N     |\/||
O     ||\/|
P     |||\/
R     \|/||
S     |\|/|
T     ||\|/
U     \||/|
W     |\||/
Y     \|||/
</code>```

Rules/Requirements

Each submission should be either a full program or function. If it is a function, it must be runnable by only needing to add the function call to the bottom of the program. Anything else (e.g. headers in C), must be included.

If it is possible, provide a link to a site where your program can be tested.

Your program must not write anything to STDERR.

Standard Loopholes are forbidden.

Your program can output in any case, but it must be printed (not an array or similar).

Scoring

Programs are scored according to bytes, in UTF-8 by default or a different character set of your choice.

Eventually, the answer with the least bytes will win.

Submissions

To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:

```<code># Language Name, N bytes
</code>```

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

```<code># Ruby, <s>104</s> <s>101</s> 96 bytes
</code>```

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:

```<code># Perl, 43 + 2 (-p flag) = 45 bytes
</code>```

You can also make the language name a link which will then show up in the leaderboard snippet:

```<code># [><>](http://esolangs.org/wiki/Fish), 121 bytes
</code>```

Leaderboard

Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.

/* Configuration */

var QUESTION_ID = 87104; // Obtain this from the url
// It will be like https://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 48934; // This should be the user ID of the challenge author.

/* App */

var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page;

function answersUrl(index) {
  return "https://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

function commentUrl(index, answers) {
  return "https://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}

function getAnswers() {
  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });
}

function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      data.items.forEach(function(c) {
        if (c.owner.user_id === OVERRIDE_USER)
          answers_hash[c.post_id].comments.push(c);
      });
      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });
}

getAnswers();

var SCORE_REG = /<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;

var OVERRIDE_REG = /^Override\s*header:\s*/i;

function getAuthorName(a) {
  return a.owner.display_name;
}

function process() {
  var valid = [];

  answers.forEach(function(a) {
    var body = a.body;
    a.comments.forEach(function(c) {
      if(OVERRIDE_REG.test(c.body))
        body = '
' + c.body.replace(OVERRIDE_REG, '') + '
';
    });

    var match = body.match(SCORE_REG);
    if (match)
      valid.push({
        user: getAuthorName(a),
        size: +match[2],
        language: match[1],
        link: a.share_link,
      });

  });

  valid.sort(function (a, b) {
    var aB = a.size,
        bB = b.size;
    return aB - bB
  });

  var languages = {};
  var place = 1;
  var lastSize = null;
  var lastPlace = 1;
  valid.forEach(function (a) {
    if (a.size != lastSize)
      lastPlace = place;
    lastSize = a.size;
    ++place;

    var answer = jQuery("#answer-template").html();
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
                   .replace("{{NAME}}", a.user)
                   .replace("{{LANGUAGE}}", a.language)
                   .replace("{{SIZE}}", a.size)
                   .replace("{{LINK}}", a.link);
    answer = jQuery(answer);
    jQuery("#answers").append(answer);

    var lang = a.language;
    if (/ b.lang) return 1;
    if (a.lang < b.lang) return -1;
    return 0;
  });

  for (var i = 0; i < langs.length; ++i)
  {
    var language = jQuery("#language-template").html();
    var lang = langs[i];
    language = language.replace("{{LANGUAGE}}", lang.lang)
                       .replace("{{NAME}}", lang.user)
                       .replace("{{SIZE}}", lang.size)
                       .replace("{{LINK}}", lang.link);
    language = jQuery(language);
    jQuery("#languages").append(language);
  }

}```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body { text-align: left !important}

#answer-list {
  padding: 10px;
  width: 290px;
  float: left;
}

#language-list {
  padding: 10px;
  width: 290px;
  float: left;
}

table thead {
  font-weight: bold;
}

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:
JavaScript (ES6), <s>97</s> 89 bytes

c=>(n=`ABEHMDFINRGKOSULPTWY`.search(c),s=[...`|||||`],s[4-n%5]=`\\`,s[n>>2]=`/`,s.join``)

Edit: Saved 3 bytes by switching to a lookup table that doesn't need padding. Saved 5 bytes by setting array elements instead of trying to edit a string.

Explanation: The table ABEHMDFINRGKOSULPTWY is organised so that if you split it into 5 groups of 4 adjacent letters then each letter in the group is on the same / slant in the diagram, while if you split it into 5 groups by taking the index modulo 5 then each letter in the group is on the same \ slant in the diagram. These latter groups are in reverse order but that's easily handled by subtracting from 4. (Arranging the table so that the former groups were in reverse order cost more to fix.)


答:
Matricks, 24 bytes

Very simple, just wanted to show off the new matrix definition feature.

```<code>m61:1:n;;a<40,58,41,45>;
</code>```

Run with python matricks.py snek.txt [[]] <input> --asciiprint

Title: Snakes all around

Body:
Challenge

The challenge is simple: print a snake.

You will get the length of the snake as input.

A snake of length 2 looks like this:

```<code>==(:)-
</code>```

A snake of length 7 looks like this:

```<code>=======(:)-
</code>```

In other words, the length of a snake is how many equal signs are before the head.

Usage

Let's say I made a C++ implementation and compiled it to ./getsnake.

I could run it like so:

```<code>$ ./getsnake 10
==========(:)-
</code>```

Clarifications

Standard loopholes are disallowed.

You can get input and output in any acceptable way.

You can assume all inputs given are positive integers.

You may write a function instead of a regular program.

Body:
Matricks, 24 bytes

Very simple, just wanted to show off the new matrix definition feature.

m61:1:n;;a<40,58,41,45>;

Run with python matricks.py snek.txt [[]] <input> --asciiprint


答:
Perl 6, <s> 16 15 </s> 12 bytes

<s>{"{'='x$_}(:)-"}
{'='x$_~'(:)-'}</s>
'='x*~'(:)-'```

<h3>Explanation:</h3>

<pre class="lang-perl6 prettyprint-override"><code>'=' x * # ｢=｣ string repeated by the only parameter ｢*｣
~        # concatenated with
'(:)-'   # the head
</code>```

Usage:

# store it in the lexical namespace
my &snake = '='x*~'(:)-';

put snake 10;

# put ^5 .map: &snake;
put ^5 .map: '='x*~'(:)-';
```

<pre class="lang-none prettyprint-override"><code>==========(:)-
(:)- =(:)- ==(:)- ===(:)- ====(:)- =====(:)-
</code>```

Title: Snakes all around

Body:
Perl 6, <s> 16 15 </s> 12 bytes

<s>{"{'='x$_}(:)-"}
{'='x$_~'(:)-'}</s>
'='x*~'(:)-'

Explanation:

'=' x * # ｢=｣ string repeated by the only parameter ｢*｣
~        # concatenated with
'(:)-'   # the head

Usage:

# store it in the lexical namespace
my &snake = '='x*~'(:)-';

put snake 10;

# put ^5 .map: &snake;
put ^5 .map: '='x*~'(:)-';

==========(:)-
(:)- =(:)- ==(:)- ===(:)- ====(:)- =====(:)-


Title: Fibonacci-orial

Body:
Definition

Fibonacci sequence F(n), on the positive integers, are defined as such:

```<code>1. F(1) = 1
2. F(2) = 1
3. F(n) = F(n-1) + F(n-2), where n is an integer and n > 2
</code>```

The Fibonacci-orial of a positive integer is the product of [F(1), F(2), ..., F(n)].

Task

Given positive integer n, find the Fibonacci-orial of n.

Specs

The fibonacci-orial of 100 must compute in under 5 seconds on a reasonable computer.

Testcases

```<code>n   Fibonacci-orial of n
1   1
2   1
3   2
4   6
5   30
6   240
7   3120
8   65520
9   2227680
10  122522400
11  10904493600
12  1570247078400
13  365867569267200
14  137932073613734400
15  84138564904377984000
16  83044763560621070208000
17  132622487406311849122176000
18  342696507457909818131702784000
19  1432814097681520949608649339904000
20  9692987370815489224102512784450560000
100 3371601853146468125386964065447576689828006172937411310662486977801540671138589868616500834190029067583665182291701553172011082574587431382310099030394306877775647395167143332483560925112960024644459715300507481235056111434293619038347456390454209587101225261757371666449068625033999573552165524529725467628060170886602001077137613803027158648329335507728698605769992818756765633305318529965186184043999696650407246193257877568825245646129366994079739720698147440310773871269639752334356493678913424390564535389212240038895626811627949132978086070255082668392290037141141291484839596694182152062726390364094447642643912371532491388089634845995941928089653751672688740718152064107169357399466473375804972260594768969952507346694189050233823596316467570584434128052398891223730335019092974935617029638919358286124350711360361279157416837428904150054292406756317837582840596331363581207781793070936765786629772999832857257349696094416616259974304208756997835360702840912518532683324936435856348020736000000000000000000000000
</code>```

References

Obligatory OEIS A003266

OEIS A000045 - Fibonacci sequence

Body:
Brainfuck, <s>1198</s> <s>1067</s> <s>817</s> <s>770</s> <s>741</s> <s>657</s> <s>611</s> 603

,[>++++++[-<-------->]<<[->++++++++++<]>>,]>+>+>>+>+<<<<<<[->>>[[-]
<[->+<]>>[-<+<+>>]<[->+<[->+<[->+<[->+<[->+<[->+<[->+<[->+<[->+<[->
[-]>>>>>>+>+<<<<<<<<[->+<]]]]]]]]]]]+>>>>>>>>]<<<<<<<<[->[-<+<<+>>>
]<[->+<]>>>[<<<<<[->>>>>>>>+<<<<<<<<]>>>>>>>>>>>>>]<<<<<<<<[->>>[-<
<<<<<<<+>>>>[->+>>+<<<]>[-<+>]>>>]<<[->>>>>>>+>+<<<<<<<<]<+<<<<<<<<
]>>>[-]>>>>>[[-]>[->+<]>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[-<
+>[->>>>>>+>+<<<<<<<<[-]]]]]]]]]]>]<<[<]+>>>>>>>>]<<<<<<<<[<<<<<<<<
]>>>>>[>>>>>>>>]+<<<<<<<<]>>>>>>>>>>>[<[-]>>[-<<+>>]>>>>>>>]<<<<<<<
<[<<<<<<<<]>>]>>>>>>[>>>>>>>>]<<<<<<<<[+++++[-<++++++++>]<.<<<<<<<]

Uncompressed, with comments:

# parse input (max 255)
,[>++++++[-<-------->]<<[->++++++++++<]>>,]
>+>+>>+>+<<<<<<
[->>>
  # compute next fibonacci number
  [[-]<
    [->+<]>>
    [-<+<+>>]<
    # perform carries
    [->+<[->+<[->+<[->+<[->+<[->+<[->+<[->+<[->+<
      [->[-]>>>>>>+>+<<<<<<<<[->+<]]
    ]]]]]]]]]+>>>>>>>>
  ]<<<<<<<<
  # multiplication
  [->
    # extract next digit of F_n (most significant first)
    [-<+<<+>>>]<
    [->+<]>>>
    # move back to the end
    [<<<<<
      [->>>>>>>>+<<<<<<<<]>>>>>>>>>>>>>
    ]<<<<<<<<
    # digit wise multiplication (shifting current digit)
    [->>>
      [-<<<<<<<<+>>>>
        [->+>>+<<<]>
        [-<+>]>>>
      ]<<
      # shift previous total over one gap (in effect multiplying by 10)
      [->>>>>>>+>+<<<<<<<<]<+<<<<<<<<
    ]>>>[-]>>>>>
    # add product to total
    [[-]>
      [->+<]>
      # perform carries
      [-<+>
        [-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>
          [->>>>>>+>+<<<<<<<<[-]]
        ]]]]]]]]>
      ]<<[<]+>>>>>>>>
    ]<<<<<<<<
    [<<<<<<<<]>>>>>
    [>>>>>>>>]+<<<<<<<<
  ]>>>>>>>>>>>
  # overwrite previous product
  [<[-]>>
    [-<<+>>]>>>>>>>
  ]<<<<<<<<
  [<<<<<<<<]>>
]>>>>>>
# output product
[>>>>>>>>]<<<<<<<<
[+++++
  [-<++++++++>]<.<<<<<<<
]

Try it online!

Runtime for n = 100 is less than 1 second with the online interpreter (about 0.2s locally using my own interpreter). Maximum input is 255, but would require the interpreter to support ~54000 cells (the online interpreter seems to wrap on  64k).

Change Log

Saved around 130 bytes with better extraction of the current digit to multiply through by, and by merging add and carry into a single pass. It also seems to be a bit faster.

Saved another 250 bytes. I managed to reduce my multiplication scratch pad by two cells, which saves bytes just about everywhere by not having to shift so far between digits. I also dropped the carry after multiplying through by a digit, and instead perform a full carry whilst adding to the running total.

Chopped another 50, again with better extraction of the current digit to multiply through by, simply by not moving it forward the first iteration, and working from where it is. A few micro-optimization further down account for around ~10 bytes.

30 more gone. Marking digits that have already been taken with a 0 rather than a 1 makes them easier to locate. It also makes the check if the multiplication loop has finished somewhat simpler.

I reduced the scratch pad by another cell, for 80 more bytes. I did this by merging the marker for the previous product and the current running total, which reduces the shifts between gaps, and makes bookkeeping a bit easier.

Saved another 50, by eliminating yet another cell, reusing the marker for fibonacci digits to mark the last digit taken as well. I was also able to merge the loop to shift the previous totals with the digit-wise multiplication loop.

Saved 8 bytes on input parsing. Oops.


答:
Javascript, 23 bytes

```<code>n=>"=".repeat(n)+"(:)-"
</code>```

Title: Snakes all around

Body:
Javascript, 23 bytes

n=>"=".repeat(n)+"(:)-"


问:
Big or Little Endian
Write a program or function that outputs an L if run on a little endian architecture or a B if run on a big endian architecture. Lower case output l or b is also acceptable.

There is no input.

Scoring is code golf, so the code with the fewest bytes wins.

Edit: As per the comments below, I am clarifying that the entry must be able to run on either architecture.

I believe that there is only one answer that this affects, and that answer has clearly indicated that this is the case.

答:
Bash, 27 bytes

```<code>iconv -tucs2<<<䉌|head -c1
</code>```

䉌 (U+424C) is encoded as three UTF-8 bytes: E4 89 8C.

It is assumed that iconv uses the function from glibc and that a UTF-8 locale is used.

Title: Big or Little Endian

Body:
Bash, 27 bytes

iconv -tucs2<<<䉌|head -c1

䉌 (U+424C) is encoded as three UTF-8 bytes: E4 89 8C.

It is assumed that iconv uses the function from glibc and that a UTF-8 locale is used.


问:
Print/Output the L-phabet
Inspired by George Gibson's Print a Tabula Recta.

You are to print/output this exact text:

```<code>ABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZ
CCCDEFGHIJKLMNOPQRSTUVWXYZ
DDDDEFGHIJKLMNOPQRSTUVWXYZ
EEEEEFGHIJKLMNOPQRSTUVWXYZ
FFFFFFGHIJKLMNOPQRSTUVWXYZ
GGGGGGGHIJKLMNOPQRSTUVWXYZ
HHHHHHHHIJKLMNOPQRSTUVWXYZ
IIIIIIIIIJKLMNOPQRSTUVWXYZ
JJJJJJJJJJKLMNOPQRSTUVWXYZ
KKKKKKKKKKKLMNOPQRSTUVWXYZ
LLLLLLLLLLLLMNOPQRSTUVWXYZ
MMMMMMMMMMMMMNOPQRSTUVWXYZ
NNNNNNNNNNNNNNOPQRSTUVWXYZ
OOOOOOOOOOOOOOOPQRSTUVWXYZ
PPPPPPPPPPPPPPPPQRSTUVWXYZ
QQQQQQQQQQQQQQQQQRSTUVWXYZ
RRRRRRRRRRRRRRRRRRSTUVWXYZ
SSSSSSSSSSSSSSSSSSSTUVWXYZ
TTTTTTTTTTTTTTTTTTTTUVWXYZ
UUUUUUUUUUUUUUUUUUUUUVWXYZ
VVVVVVVVVVVVVVVVVVVVVVWXYZ
WWWWWWWWWWWWWWWWWWWWWWWXYZ
XXXXXXXXXXXXXXXXXXXXXXXXYZ
YYYYYYYYYYYYYYYYYYYYYYYYYZ
ZZZZZZZZZZZZZZZZZZZZZZZZZZ
</code>```

(Yes, I typed that by hand)

You are allowed to use all lowercase instead of all uppercase.

However, your choice of case must be consistent throughout the whole text.

Rules/Requirements

Each submission should be either a full program or function. If it is a function, it must be runnable by only needing to add the function call to the bottom of the program. Anything else (e.g. headers in C), must be included.

If it is possible, provide a link to a site where your program can be tested.

Your program must not write anything to STDERR.

Standard Loopholes are forbidden.

Your program can output in any case, but it must be printed (not an array or similar).

Scoring

Programs are scored according to bytes, in UTF-8 by default or a different character set of your choice.

Eventually, the answer with the least bytes will win.

Submissions

To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:

```<code># Language Name, N bytes
</code>```

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

```<code># Ruby, <s>104</s> <s>101</s> 96 bytes
</code>```

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:

```<code># Perl, 43 + 2 (-p flag) = 45 bytes
</code>```

You can also make the language name a link which will then show up in the leaderboard snippet:

```<code># [><>](http://esolangs.org/wiki/Fish), 121 bytes
</code>```

Leaderboard

Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.

/* Configuration */

var QUESTION_ID = 87064; // Obtain this from the url
// It will be like https://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 48934; // This should be the user ID of the challenge author.

/* App */

var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page;

function answersUrl(index) {
  return "https://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

function commentUrl(index, answers) {
  return "https://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}

function getAnswers() {
  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });
}

function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      data.items.forEach(function(c) {
        if (c.owner.user_id === OVERRIDE_USER)
          answers_hash[c.post_id].comments.push(c);
      });
      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });
}

getAnswers();

var SCORE_REG = /<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;

var OVERRIDE_REG = /^Override\s*header:\s*/i;

function getAuthorName(a) {
  return a.owner.display_name;
}

function process() {
  var valid = [];

  answers.forEach(function(a) {
    var body = a.body;
    a.comments.forEach(function(c) {
      if(OVERRIDE_REG.test(c.body))
        body = '
' + c.body.replace(OVERRIDE_REG, '') + '
';
    });

    var match = body.match(SCORE_REG);
    if (match)
      valid.push({
        user: getAuthorName(a),
        size: +match[2],
        language: match[1],
        link: a.share_link,
      });

  });

  valid.sort(function (a, b) {
    var aB = a.size,
        bB = b.size;
    return aB - bB
  });

  var languages = {};
  var place = 1;
  var lastSize = null;
  var lastPlace = 1;
  valid.forEach(function (a) {
    if (a.size != lastSize)
      lastPlace = place;
    lastSize = a.size;
    ++place;

    var answer = jQuery("#answer-template").html();
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
                   .replace("{{NAME}}", a.user)
                   .replace("{{LANGUAGE}}", a.language)
                   .replace("{{SIZE}}", a.size)
                   .replace("{{LINK}}", a.link);
    answer = jQuery(answer);
    jQuery("#answers").append(answer);

    var lang = a.language;
    if (/ b.lang) return 1;
    if (a.lang < b.lang) return -1;
    return 0;
  });

  for (var i = 0; i < langs.length; ++i)
  {
    var language = jQuery("#language-template").html();
    var lang = langs[i];
    language = language.replace("{{LANGUAGE}}", lang.lang)
                       .replace("{{NAME}}", lang.user)
                       .replace("{{SIZE}}", lang.size)
                       .replace("{{LINK}}", lang.link);
    language = jQuery(language);
    jQuery("#languages").append(language);
  }

}```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body { text-align: left !important}

#answer-list {
  padding: 10px;
  width: 290px;
  float: left;
}

#language-list {
  padding: 10px;
  width: 290px;
  float: left;
}

table thead {
  font-weight: bold;
}

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

```

答:
Brainfuck, 126 bytes

```<code>++++++++++[<+++++++++<+>>-]>+++++[<+++++>-]<+[->>+++++[-<+++++<<----->>>]<+>>[-<+<<<+>>>>]<[->+<<-<<.>>>]>+<<[-<<.+>>]<<<.>->]
</code>```

Still couldn't outgolf Dennis.
Try it online!

Explanation

(The random plusses are to offset hyphens/minuses used in the explanation)

```<code>+++++ +++++[<+++++ ++++<+>>-]
 Set the first cell to 10 (for the newline)
 Set the seccond cell to 90 (char code of Z to match the end result of the main loop

>+++++[<+++++>-]<+
 Set the third cell to 26 (the number of lines to make)
 Tape:
  10 90 26
        ^^

[- Main loop: runs 26 times (represented by n)

  >>+++++[-<+++++<<----->>>]<+
   Bring the second cell back to 65 (char code of A)
   Set the fourth cell to 26 (the number of letters per line)
   Tape on first time through loop:
    10 65 26-n 26  0  n
+              ^^

  >>[-<+<<<+>>>>]<
   The sixth cell contains a counter n of the number of lines we've done (initially zero)
   Add n to 65 (cell 2) to skip over the letters covered by the repeated letter
   Move the counter to cell 5
    10 65+n 26-n 26  n  0
                     ^
  [->+<<-<<.>>>]>+<<
    Move the counter back to cell 6
    Output the repeated character n times
    Subtract the n from cell 4 to leave room for only the non-repeated characters
    Increment n for next time
     10 65+n 26-n 26-n  0  n
++                ^^^^

  [-<<.+>>]
   Fill the remaining spots in the line with the rest of the alphabet by outputting cell 2 and incrementing
    10 91 26-n  0  0  n
+               ^

  <<<.>-
   Put a newline (cell 1)
   Change 91 to 90 because it's easier to subtract 25 than 26 to reset it
    10 90 26-n  0  0  n
+      ^^
>]
</code>```

Title: Print/Output the L-phabet

Body:
Brainfuck, 126 bytes

++++++++++[<+++++++++<+>>-]>+++++[<+++++>-]<+[->>+++++[-<+++++<<----->>>]<+>>[-<+<<<+>>>>]<[->+<<-<<.>>>]>+<<[-<<.+>>]<<<.>->]

Still couldn't outgolf Dennis.
Try it online!

Explanation

(The random plusses are to offset hyphens/minuses used in the explanation)

+++++ +++++[<+++++ ++++<+>>-]
 Set the first cell to 10 (for the newline)
 Set the seccond cell to 90 (char code of Z to match the end result of the main loop

>+++++[<+++++>-]<+
 Set the third cell to 26 (the number of lines to make)
 Tape:
  10 90 26
        ^^

[- Main loop: runs 26 times (represented by n)

  >>+++++[-<+++++<<----->>>]<+
   Bring the second cell back to 65 (char code of A)
   Set the fourth cell to 26 (the number of letters per line)
   Tape on first time through loop:
    10 65 26-n 26  0  n
+              ^^

  >>[-<+<<<+>>>>]<
   The sixth cell contains a counter n of the number of lines we've done (initially zero)
   Add n to 65 (cell 2) to skip over the letters covered by the repeated letter
   Move the counter to cell 5
    10 65+n 26-n 26  n  0
                     ^
  [->+<<-<<.>>>]>+<<
    Move the counter back to cell 6
    Output the repeated character n times
    Subtract the n from cell 4 to leave room for only the non-repeated characters
    Increment n for next time
     10 65+n 26-n 26-n  0  n
++                ^^^^

  [-<<.+>>]
   Fill the remaining spots in the line with the rest of the alphabet by outputting cell 2 and incrementing
    10 91 26-n  0  0  n
+               ^

  <<<.>-
   Put a newline (cell 1)
   Change 91 to 90 because it's easier to subtract 25 than 26 to reset it
    10 90 26-n  0  0  n
+      ^^
>]


问:
Write an interactive Deadfish interpreter
Deadfish is a joke "programming language" with four commands. Because the Esolang page is a bit contradictory and the interpreters on that page don't all work exactly the same, you should implement the following variation:

Specification

There is an accumulator which is at least 16 bits in size, more is allowed but less is not. Negative numbers do not need to be supported. The accumulator is 0 when the program starts.

There are the following two sets of four commands, and your program must support both at the same time.
```
  Standard Deadfish    │   XKCD Variant   │    Meaning
  ─────────────────────┼──────────────────┼────────────────────────────────────
        i              │        x         │    Increment accumulator
        d              │        d         │    Decrement accumulator
        s              │        k         │    Square ( acc = acc * acc )
        o              │        c         │    Output accumulator, as a number
```

If, after executing a command, the accumulator is either -1 or 256, the accumulator must be reset to zero. Note that this is not normal wrap-around. If, say, the accumulator is 20, and the s command is run, the accumulator should be 400 afterward. Similarly, if the accumulator is 257 and the d command is run, the accumulator should become 0.

Any input that isn't one of these commands should be ignored.

Test programs

xiskso should output 0

xiskisc should output 289

I/O

Your program should display a prompt: >>. The prompt must be at the beginning of a new line. It should then read a line of user input, and run the given commands left-to-right. When outputing numbers, the numbers must be separated. I.e., 12 34 is OK, 12,34 is OK,

```<code>12
34
</code>```

is OK, but 1234 is not.

Your program should keep doing this in a loop, at least until EOF is reached.

Example session:

```<code>>> xiskso
0
>> xiskisc
289
>> ddddo ddddo
285
281
>> ddddo ddddo
277
273
>> dddddddo
266
>> dddddddddo
257
>> do
0
>> do
0
>> io
1
>>
</code>```

答:
JavaScript (Node.js), 204 Bytes

```<code>process.openStdin(f=a=>process.stdout.write((i=0,""+a).split` `.map(x=>([...x.slice(0,-1)].map(d=>({i:x=e=>i++,d:e=>i--,s:k=e=>i*=i,o:c=e=>e,x,k,c})[d](i=-1||i==256?i=0:0)),i))+"\n>> "),f``).on("data",f)
</code>```

This can probably be golfed. Node.js again proves it's strange disguised verbosity once again.
Code explained:

```<code>process.openStdin( // This function has to be called to take input, but doesn't have arguments
  f=a=> // Define a function f. This is the deadfish interpreter. It takes an argument `a` which is a Buffer
  process.stdout.write( // Same as console.log, but doesn't output trailing newline
    (i = 0, "" + a) // Take advantage of comma operator to (A) define the accumulator i, and casts a (which is a Buffer) to a String
      .split` ` // Split the string a at spaces, making it an array
      .map(     // Map through each element of the array
        x=>     // Map function, takes argument x, the value in the array (string)
          ([...x.slice(0,-1)] // Remove the last character (newline) and than use the spread operator to divide the string into an array of it's chars
            .map(d=> // Map function, you know how this works
              ({ // Here I define the various deadfish commands
                i: x = e => i++,
                d: e => i--,
                s: k = e => i*=i,
                o: c = e => e,
                // Take advantage of ES6 object notation. Equivilent to {"x": x, "k": k, "c", c}
                x,
                k,
                c
              })
              [d] // Get the command to execute. If this is passed something which isn't valid, a giant error will appear
              (
                i==-1 || i==256 ? i = 0 : 0 // Take advantage of the fact that none of the command functions take arguments to handle the strange "overflow"
              )
            ),
          i)
      ) +
  "\n>> "), // Display the prompt again, as well as a newline
  f`` // Initalize the prompt by passing an empty script
)
.on("data",f) // Bind the f function to newline on STDIN
</code>```

Body:
JavaScript (Node.js), 204 Bytes

process.openStdin(f=a=>process.stdout.write((i=0,""+a).split` `.map(x=>([...x.slice(0,-1)].map(d=>({i:x=e=>i++,d:e=>i--,s:k=e=>i*=i,o:c=e=>e,x,k,c})[d](i=-1||i==256?i=0:0)),i))+"\n>> "),f``).on("data",f)

This can probably be golfed. Node.js again proves it's strange disguised verbosity once again.
Code explained:

process.openStdin( // This function has to be called to take input, but doesn't have arguments
  f=a=> // Define a function f. This is the deadfish interpreter. It takes an argument `a` which is a Buffer
  process.stdout.write( // Same as console.log, but doesn't output trailing newline
    (i = 0, "" + a) // Take advantage of comma operator to (A) define the accumulator i, and casts a (which is a Buffer) to a String
      .split` ` // Split the string a at spaces, making it an array
      .map(     // Map through each element of the array
        x=>     // Map function, takes argument x, the value in the array (string)
          ([...x.slice(0,-1)] // Remove the last character (newline) and than use the spread operator to divide the string into an array of it's chars
            .map(d=> // Map function, you know how this works
              ({ // Here I define the various deadfish commands
                i: x = e => i++,
                d: e => i--,
                s: k = e => i*=i,
                o: c = e => e,
                // Take advantage of ES6 object notation. Equivilent to {"x": x, "k": k, "c", c}
                x,
                k,
                c
              })
              [d] // Get the command to execute. If this is passed something which isn't valid, a giant error will appear
              (
                i==-1 || i==256 ? i = 0 : 0 // Take advantage of the fact that none of the command functions take arguments to handle the strange "overflow"
              )
            ),
          i)
      ) +
  "\n>> "), // Display the prompt again, as well as a newline
  f`` // Initalize the prompt by passing an empty script
)
.on("data",f) // Bind the f function to newline on STDIN


答:
Batch, 68 bytes

```<code>@set h=(:)-
@for /l %%i in (1,1,%1)do @call set h==%%h%%
@echo %h%
</code>```

Title: Snakes all around

Body:
Batch, 68 bytes

@set h=(:)-
@for /l %%i in (1,1,%1)do @call set h==%%h%%
@echo %h%


答:
MATL, 12 bytes

```<code>61iY"'(:)-'h
</code>```

Try it on MATL Online.

Explanation

```<code>61       % ASCII value for '='
i        % Take input number, n
Y"       % Row vector with 61 repeated n times
'(:)-'   % Push this string
h        % Concatenate horizontally. This converts to string. Implicitly display
</code>```

Title: Snakes all around

Body:
MATL, 12 bytes

61iY"'(:)-'h

Try it on MATL Online.

Explanation

61       % ASCII value for '='
i        % Take input number, n
Y"       % Row vector with 61 repeated n times
'(:)-'   % Push this string
h        % Concatenate horizontally. This converts to string. Implicitly display


答:
C# – 369 (I guess)

Func<float,float,float[]>C=(x,y)=>new[]{x,y};
Func<float[]>read=()=>{var m=new Regex(@"(\d*(\.\d*)?) *([+-]) *(\d*(\.\d*)?)i").Match(Console.ReadLine()).Groups;return C(float.Parse(m[1].Value),float.Parse(m[2].Value+m[4].Value));};
Action<float[]>print=x=>{Console.WriteLine("{0} {1} {2}i",x[0],x[1]>=0?"+":"-",Math.Abs(x[1]));};
Func<float[],float[],float[]>add=(x,y)=>C(x[0]+y[0],x[1]+y[1]);
Func<float[],float[],float[]>sub=(x,y)=>C(x[0]-y[0],x[1]-y[1]);
Func<float[],float[],float[]>mul=(x,y)=>C(x[0]*y[0]-x[1]*y[1],x[0]*y[1]+x[1]*y[0]);
Func<float[],float[],float[]>div=(x,y)=>mul(x,C(y[0],-y[1])).Select(_=>_/(y[0]*y[0]+y[1]*y[1])).ToArray();

var a = read();
var b = read();
var c = C(3, -7);
var d = C(2, 5);
var e = div(a,c);
var f = mul(b,d);
var g = add(e,f);
print(g);
```

Not sure about the character counting definition, really…

Title: Perform basic operations on complex numbers in a language without native support for complex numbers

Body:
Your code has to provide the following functions:

```<code>read(x)
</code>```

Reads a complex number from the standard input. It has to accept and evaluate something in the form of for example 1.42 + 3i.

```<code>print(x)
</code>```

Prints the complex number in the form of, for example 1.23 - 4.32i

```<code>add(x,y)
sub(x,y)
mult(x,y)
div(x,y)
</code>```

Adds, subtracts, multiplies and respectively divides the two complex numbers.

It is enough if your functions are accurate to two digits after the decimal point, of course, it can be more if you so wish. The input will never have more than two digits after the decimal point.

Any language without native support for complex numbers may be used. Similarly, libraries or other language features which deal with complex numbers are not permitted. The point is, you have to do all the handling of complex numbers by yourself.

Scoring

This is a code golf. The score is the sum of the lengths of the function bodies. For example, int add(int a, int b) {return a+b;} will have a length of 11 because of return a+b. Your solution must have a main program which demonstrates the use of the functions (for easier evaluation of your solution), but it will not be part of the scoring.

You can store the complex numbers in any way you wish, but the functions must have exactly the same amount of parameters as in the above description.

EDIT: For languages that support it, you can use operator overloading instead of the add, sub, etc. functions.

EDIT 2: To prohibit the cheap #define all_your_code_here A, I'll try to clarify the "only function bodies count" better: every character in the code counts, except for the overhead required to declare and define the functions and the libraries required to do basic I/O. By basic I/O I still mean no language features which directly deal with complex numbers. The main or equivalent where you call these functions don't count but you are not allowed to do anything besides using those functions for demonstrative purpose.

Body:
C# – 369 (I guess)

Func<float,float,float[]>C=(x,y)=>new[]{x,y};
Func<float[]>read=()=>{var m=new Regex(@"(\d*(\.\d*)?) *([+-]) *(\d*(\.\d*)?)i").Match(Console.ReadLine()).Groups;return C(float.Parse(m[1].Value),float.Parse(m[2].Value+m[4].Value));};
Action<float[]>print=x=>{Console.WriteLine("{0} {1} {2}i",x[0],x[1]>=0?"+":"-",Math.Abs(x[1]));};
Func<float[],float[],float[]>add=(x,y)=>C(x[0]+y[0],x[1]+y[1]);
Func<float[],float[],float[]>sub=(x,y)=>C(x[0]-y[0],x[1]-y[1]);
Func<float[],float[],float[]>mul=(x,y)=>C(x[0]*y[0]-x[1]*y[1],x[0]*y[1]+x[1]*y[0]);
Func<float[],float[],float[]>div=(x,y)=>mul(x,C(y[0],-y[1])).Select(_=>_/(y[0]*y[0]+y[1]*y[1])).ToArray();

var a = read();
var b = read();
var c = C(3, -7);
var d = C(2, 5);
var e = div(a,c);
var f = mul(b,d);
var g = add(e,f);
print(g);

Not sure about the character counting definition, really…


答:
Nim, 46 bytes

import strutils,future
n=>repeat("=",n)&"(:)-"
```

<p>This is an anonymous function that must be passed to a procedure to be used. To test, use the testing program below:</p>

<pre class="lang-nim prettyprint-override"><code>import strutils,future
proc test(f: int -> string) = echo f(#[Your input here]#)
test(n=>repeat("=",n)&"(:)-")
</code>```

Title: Snakes all around

Body:
Nim, 46 bytes

import strutils,future
n=>repeat("=",n)&"(:)-"

This is an anonymous function that must be passed to a procedure to be used. To test, use the testing program below:

import strutils,future
proc test(f: int -> string) = echo f(#[Your input here]#)
test(n=>repeat("=",n)&"(:)-")


答:
Brian & Chuck, 31 bytes

```<code>,{-?>}-):(=?
#}<<.{?_<.<.<.<.<.
</code>```

Input in the form of a byte value, so e.g. input ! gives a snake of length 33.

Try it online!

It's been a while...

Explanation

A quick Brian & Chuck primer:

The first line of the program is Brian, the second is Chuck.

Brian and Chuck are two Brainfuck-like instances. The main catch is that Chuck's program is Brian's tape and vice versa. The tape heads/instruction pointers start on the first cell of each tape and execution starts on Brian.

As for the commands, there are a few differences. Only Brian can use , (input) and only Chuck can use . (output). In addition to < and > there are { and } which move the tape head up to the next zero cell (or in the case of { to the left end of the tape if there is no zero cell on the way). Instead of [...], the only control flow is ? which switches control to the other instance if the current cell is non-zero. The first executed instruction on the other cell is the one after the condition. And finally, _ is just an alias for null-bytes, for convenience.

Now the code. Brian starts with this:

```<code>,{-?
</code>```

This reads the input into Chuck's first cell, then moves the tape head to the left with { (does nothing right now) and decrements the input with - before switching control for Chuck if the value is still non-zero. This begins the main loop. Chuck then runs this bit:

```<code>}<<.{?
</code>```

This moves the tape head on Brian to the very end, moves two cells left onto the = and prints it before the tape head all the way to the left and switching control back to Brian. This is how loops generally work in B&C.

Once the input has been reduced to zero, the ? on Brian's tape will do nothing. Then Brian executes this part:

```<code>>}-):(=?
</code>```

The ):(= are no-ops, so the actual code is just >}-?. We move off the zero cell with >, move up to _ with }, decrement it to make it non-zero and switch to Chuck with ?. Then the last bit on Chuck is run:

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

This simply prints the five characters in front of Chuck, i.e. =(:)-. Note that we need to print another = since the main loop is only executed N-1 times for input N.

Title: Snakes all around

Body:
Brian & Chuck, 31 bytes

,{-?>}-):(=?
#}<<.{?_<.<.<.<.<.

Input in the form of a byte value, so e.g. input ! gives a snake of length 33.

Try it online!

It's been a while...

Explanation

A quick Brian & Chuck primer:

The first line of the program is Brian, the second is Chuck.

Brian and Chuck are two Brainfuck-like instances. The main catch is that Chuck's program is Brian's tape and vice versa. The tape heads/instruction pointers start on the first cell of each tape and execution starts on Brian.

As for the commands, there are a few differences. Only Brian can use , (input) and only Chuck can use . (output). In addition to < and > there are { and } which move the tape head up to the next zero cell (or in the case of { to the left end of the tape if there is no zero cell on the way). Instead of [...], the only control flow is ? which switches control to the other instance if the current cell is non-zero. The first executed instruction on the other cell is the one after the condition. And finally, _ is just an alias for null-bytes, for convenience.

Now the code. Brian starts with this:

,{-?

This reads the input into Chuck's first cell, then moves the tape head to the left with { (does nothing right now) and decrements the input with - before switching control for Chuck if the value is still non-zero. This begins the main loop. Chuck then runs this bit:

}<<.{?

This moves the tape head on Brian to the very end, moves two cells left onto the = and prints it before the tape head all the way to the left and switching control back to Brian. This is how loops generally work in B&C.

Once the input has been reduced to zero, the ? on Brian's tape will do nothing. Then Brian executes this part:

>}-):(=?

The ):(= are no-ops, so the actual code is just >}-?. We move off the zero cell with >, move up to _ with }, decrement it to make it non-zero and switch to Chuck with ?. Then the last bit on Chuck is run:

<.<.<.<.<.

This simply prints the five characters in front of Chuck, i.e. =(:)-. Note that we need to print another = since the main loop is only executed N-1 times for input N.


答:
ngn/apl, 20 bytes

```<code>{×/(+/(!∘⌽⍨⍳))¨1+⍳⍵}
</code>```

Try it here.

Explanation

```<code>{×/(+/(!∘⌽⍨⍳))¨1+⍳⍵}  Input: n
                  ⍵   Get n
                 ⍳    Form the range [0, 1, ..., n-1]
               1+     Add 1 to each to get [1, 2, ..., n]
              ¨       For each value x
           ⍳            Form the range [0, 1, ..., x-1]
         ⌽⍨             Reverse it to get [x-1, ..., 1, 0]
       !∘               Find the binomial coefficient between each pair in the original
                        range and reversed range
    +/                  Reduce using addition to get the xth Fibonacci number
 ×/                   Reduce using multiplication and return
</code>```

Title: Fibonacci-orial

Body:
ngn/apl, 20 bytes

{×/(+/(!∘⌽⍨⍳))¨1+⍳⍵}

Try it here.

Explanation

{×/(+/(!∘⌽⍨⍳))¨1+⍳⍵}  Input: n
                  ⍵   Get n
                 ⍳    Form the range [0, 1, ..., n-1]
               1+     Add 1 to each to get [1, 2, ..., n]
              ¨       For each value x
           ⍳            Form the range [0, 1, ..., x-1]
         ⌽⍨             Reverse it to get [x-1, ..., 1, 0]
       !∘               Find the binomial coefficient between each pair in the original
                        range and reversed range
    +/                  Reduce using addition to get the xth Fibonacci number
 ×/                   Reduce using multiplication and return


答:
Matlab / Octave, 22 bytes

```<code>@(n)[~(1:n)+61 '(:)-']
</code>```

This is an anonymous function.

Try it on Ideone.

Explanation

Assume n= 5.

1:n produces the row vector [1 2 3 4 5].

~(1:n) negates each entry, so it gives [0 0 0 0 0].

...+61 adds 61 to each entry, so it gives [61 61 61 61 61]. 61 is the ASCII value of character =.

[... '(:)-'] concatenates that with the string '(:)-'. This automatically converts [61 61 61 61 61] into the string '=====' before the concatenation.

Title: Snakes all around

Body:
Matlab / Octave, 22 bytes

@(n)[~(1:n)+61 '(:)-']

This is an anonymous function.

Try it on Ideone.

Explanation

Assume n= 5.

1:n produces the row vector [1 2 3 4 5].

~(1:n) negates each entry, so it gives [0 0 0 0 0].

...+61 adds 61 to each entry, so it gives [61 61 61 61 61]. 61 is the ASCII value of character =.

[... '(:)-'] concatenates that with the string '(:)-'. This automatically converts [61 61 61 61 61] into the string '=====' before the concatenation.


答:
VBA, 106 bytes

```<code>Function v(s):v="|||||":p=InStr(1,v &"MRUYH NSWEI OTBFK PADGL",s):Mid(v, p\5)="\":Mid(v, (p Mod 5)+1)="/"
</code>```

Final byte is enter which auto-generates End Function. With acknowledgements to the scheme @Dave devised.

Invoke in spreadsheet or in  VBA Immediate window eg with ?v("K")

Body:
Definition

According to Wikipedia:

The Cooke and Wheatstone telegraph was an early electrical telegraph system dating from the 1830s invented by English inventor William Fothergill Cooke and English scientist Charles Wheatstone. It was the first telegraph system to be put into commercial service. The receiver consisted of a number of needles which could be moved by electromagnetic coils to point to letters on a board. This feature was liked by early users who were unwilling to learn codes, and employers who did not want to invest in staff training.

It works like this:

In the middle are five needles, which can be deflected clockwise (as is the case of the middle needle) or anti-clockwise (as is the case of the last needle).

In the picture above, the two deflected needles point to the letter G, which means that the letter being transmitted/received is the letter G.

Note that the letters C, J, Q, V, X, Z are missing and thus have to be substituted with other letters.

Task

You will receive a character in ABDEFGHIKLMNOPRSTUWY as input, and you will output the corresponding configuration of the five needles, with undeflected as |, deflected clockwise as /, and deflected anti-clockwise as \.

Testcases

This covers all the possible inputs

```<code>input output
A     /|||\
B     /||\|
D     |/||\
E     /|\||
F     |/|\|
G     ||/|\  (explanation: see above)
H     /\|||
I     |/\||
K     ||/\|
L     |||/\
M     \/|||
N     |\/||
O     ||\/|
P     |||\/
R     \|/||
S     |\|/|
T     ||\|/
U     \||/|
W     |\||/
Y     \|||/
</code>```

Rules/Requirements

Each submission should be either a full program or function. If it is a function, it must be runnable by only needing to add the function call to the bottom of the program. Anything else (e.g. headers in C), must be included.

If it is possible, provide a link to a site where your program can be tested.

Your program must not write anything to STDERR.

Standard Loopholes are forbidden.

Your program can output in any case, but it must be printed (not an array or similar).

Scoring

Programs are scored according to bytes, in UTF-8 by default or a different character set of your choice.

Eventually, the answer with the least bytes will win.

Submissions

To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:

```<code># Language Name, N bytes
</code>```

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

```<code># Ruby, <s>104</s> <s>101</s> 96 bytes
</code>```

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:

```<code># Perl, 43 + 2 (-p flag) = 45 bytes
</code>```

You can also make the language name a link which will then show up in the leaderboard snippet:

```<code># [><>](http://esolangs.org/wiki/Fish), 121 bytes
</code>```

Leaderboard

Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.

/* Configuration */

var QUESTION_ID = 87104; // Obtain this from the url
// It will be like https://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 48934; // This should be the user ID of the challenge author.

/* App */

var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page;

function answersUrl(index) {
  return "https://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

function commentUrl(index, answers) {
  return "https://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}

function getAnswers() {
  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });
}

function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      data.items.forEach(function(c) {
        if (c.owner.user_id === OVERRIDE_USER)
          answers_hash[c.post_id].comments.push(c);
      });
      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });
}

getAnswers();

var SCORE_REG = /<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;

var OVERRIDE_REG = /^Override\s*header:\s*/i;

function getAuthorName(a) {
  return a.owner.display_name;
}

function process() {
  var valid = [];

  answers.forEach(function(a) {
    var body = a.body;
    a.comments.forEach(function(c) {
      if(OVERRIDE_REG.test(c.body))
        body = '
' + c.body.replace(OVERRIDE_REG, '') + '
';
    });

    var match = body.match(SCORE_REG);
    if (match)
      valid.push({
        user: getAuthorName(a),
        size: +match[2],
        language: match[1],
        link: a.share_link,
      });

  });

  valid.sort(function (a, b) {
    var aB = a.size,
        bB = b.size;
    return aB - bB
  });

  var languages = {};
  var place = 1;
  var lastSize = null;
  var lastPlace = 1;
  valid.forEach(function (a) {
    if (a.size != lastSize)
      lastPlace = place;
    lastSize = a.size;
    ++place;

    var answer = jQuery("#answer-template").html();
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
                   .replace("{{NAME}}", a.user)
                   .replace("{{LANGUAGE}}", a.language)
                   .replace("{{SIZE}}", a.size)
                   .replace("{{LINK}}", a.link);
    answer = jQuery(answer);
    jQuery("#answers").append(answer);

    var lang = a.language;
    if (/ b.lang) return 1;
    if (a.lang < b.lang) return -1;
    return 0;
  });

  for (var i = 0; i < langs.length; ++i)
  {
    var language = jQuery("#language-template").html();
    var lang = langs[i];
    language = language.replace("{{LANGUAGE}}", lang.lang)
                       .replace("{{NAME}}", lang.user)
                       .replace("{{SIZE}}", lang.size)
                       .replace("{{LINK}}", lang.link);
    language = jQuery(language);
    jQuery("#languages").append(language);
  }

}```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body { text-align: left !important}

#answer-list {
  padding: 10px;
  width: 290px;
  float: left;
}

#language-list {
  padding: 10px;
  width: 290px;
  float: left;
}

table thead {
  font-weight: bold;
}

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:
VBA, 106 bytes

Function v(s):v="|||||":p=InStr(1,v &"MRUYH NSWEI OTBFK PADGL",s):Mid(v, p\5)="\":Mid(v, (p Mod 5)+1)="/"

Final byte is enter which auto-generates End Function. With acknowledgements to the scheme @Dave devised.

Invoke in spreadsheet or in  VBA Immediate window eg with ?v("K")


Title: Snakes all around

Body:
Challenge

The challenge is simple: print a snake.

You will get the length of the snake as input.

A snake of length 2 looks like this:

```<code>==(:)-
</code>```

A snake of length 7 looks like this:

```<code>=======(:)-
</code>```

In other words, the length of a snake is how many equal signs are before the head.

Usage

Let's say I made a C++ implementation and compiled it to ./getsnake.

I could run it like so:

```<code>$ ./getsnake 10
==========(:)-
</code>```

Clarifications

Standard loopholes are disallowed.

You can get input and output in any acceptable way.

You can assume all inputs given are positive integers.

You may write a function instead of a regular program.

Body:
Haskell, 25 bytes

f n=('='<$[1..n])++"(:)-"

'='<$[1..n] is equivalent to replicate n '='.


问:
Go to opposite corner of rectangle in all directions - Harder
This is essentially the same thing as this question, except harder. You are again to write a program that gets from the lower-left corner of a rectangle to the upper-right corner. However, this time diagonal moves are allowed.

The program will accept an ordered pair (width, height), and use these as the dimensions for a rectangle. Your program will then create an ASCII-art of the solution (use . for an empty square, # for part of the solution, and X for starting square) and count the number of moves it takes to reach the endpoint.

Example

Input: (5, 6)

Output:

```<code>....#
....#
...#.
..#..
.#...
X....
Move count: 5
</code>```

Shortest answer in bytes wins!

答:
Python 3, <s>161</s> 156 bytes

```<code>def f(w,h):
 x=[['.']*w for i in[0]*h];i=0
 while i<w or i<h:x[~min(i,h-1)][min(i,w-1)]=['#','X'][i<1];i+=1
 for i in x:print(''.join(i))
 print(max(w,h)-1)
</code>```

A function that takes input via argument and prints the ascii-art, followed by the move count, to STDOUT.

How it works

The program first creates a list of lists, where each list represents one row of the grid and each element of the component lists is .. Each element that should be # has the property that if the output grid was square, the ordinates representing its location would be equal; hence, looping over some index i and inserting # at location (i, i) would give the desired output. However, the grid is not always square, and thus the indices are clamped to the grid by taking the minimum of the index and width/height (decremented due to zero-indexing) as required. If the index is zero, the current position must be the bottom-left entry, and thus X is instead inserted. Next, the elements in each line are concatenated, and each line is printed to STDOUT. The number of moves is the maximum of the width/height decremented; this is also printed.

Try it on Ideone

Body:
Python 3, <s>161</s> 156 bytes

def f(w,h):
 x=[['.']*w for i in[0]*h];i=0
 while i<w or i<h:x[~min(i,h-1)][min(i,w-1)]=['#','X'][i<1];i+=1
 for i in x:print(''.join(i))
 print(max(w,h)-1)

A function that takes input via argument and prints the ascii-art, followed by the move count, to STDOUT.

How it works

The program first creates a list of lists, where each list represents one row of the grid and each element of the component lists is .. Each element that should be # has the property that if the output grid was square, the ordinates representing its location would be equal; hence, looping over some index i and inserting # at location (i, i) would give the desired output. However, the grid is not always square, and thus the indices are clamped to the grid by taking the minimum of the index and width/height (decremented due to zero-indexing) as required. If the index is zero, the current position must be the bottom-left entry, and thus X is instead inserted. Next, the elements in each line are concatenated, and each line is printed to STDOUT. The number of moves is the maximum of the width/height decremented; this is also printed.

Try it on Ideone


答:
C, <s>78</s> <s>70</s> 67 bytes

```<code>f(i,j){for(;++i<27;puts(""))for(j=0;++j<27;putchar((i>j?i:j)+64));}
</code>```

The code makes use of the following golfing techniques for C:

omit basic includes (like stdio.h)

omit (return) types of functions and variables, making them default to int

use the ternary operator instead of if-else blocks

use the ASCII code of a letter instead of its char representation (i.e. 65 instead of 'A')

use putchar to output a single character

abuse main's argument list

use puts("") to output a newline

Also, the rule If it is a function, it must be runnable by only needing to add the function call to the bottom of the program. does not forbid the function to be called with parameters (thanks to ABcDexter!).

Try it on Ideone

An ungolfed version (without any warnings with gcc) would look like this:

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

#define MAX(x, y) (x>y ? x : y)

int main()
{
    for(int i=0; i<26; i++)
    {
        for(int j=0; j<26; j++)
            printf("%c", MAX(i, j) + 'A');
        printf("\n");
    }
    return 0;
}
</code>```

Title: Print/Output the L-phabet

Body:
Inspired by George Gibson's Print a Tabula Recta.

You are to print/output this exact text:

```<code>ABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZ
CCCDEFGHIJKLMNOPQRSTUVWXYZ
DDDDEFGHIJKLMNOPQRSTUVWXYZ
EEEEEFGHIJKLMNOPQRSTUVWXYZ
FFFFFFGHIJKLMNOPQRSTUVWXYZ
GGGGGGGHIJKLMNOPQRSTUVWXYZ
HHHHHHHHIJKLMNOPQRSTUVWXYZ
IIIIIIIIIJKLMNOPQRSTUVWXYZ
JJJJJJJJJJKLMNOPQRSTUVWXYZ
KKKKKKKKKKKLMNOPQRSTUVWXYZ
LLLLLLLLLLLLMNOPQRSTUVWXYZ
MMMMMMMMMMMMMNOPQRSTUVWXYZ
NNNNNNNNNNNNNNOPQRSTUVWXYZ
OOOOOOOOOOOOOOOPQRSTUVWXYZ
PPPPPPPPPPPPPPPPQRSTUVWXYZ
QQQQQQQQQQQQQQQQQRSTUVWXYZ
RRRRRRRRRRRRRRRRRRSTUVWXYZ
SSSSSSSSSSSSSSSSSSSTUVWXYZ
TTTTTTTTTTTTTTTTTTTTUVWXYZ
UUUUUUUUUUUUUUUUUUUUUVWXYZ
VVVVVVVVVVVVVVVVVVVVVVWXYZ
WWWWWWWWWWWWWWWWWWWWWWWXYZ
XXXXXXXXXXXXXXXXXXXXXXXXYZ
YYYYYYYYYYYYYYYYYYYYYYYYYZ
ZZZZZZZZZZZZZZZZZZZZZZZZZZ
</code>```

(Yes, I typed that by hand)

You are allowed to use all lowercase instead of all uppercase.

However, your choice of case must be consistent throughout the whole text.

Rules/Requirements

Each submission should be either a full program or function. If it is a function, it must be runnable by only needing to add the function call to the bottom of the program. Anything else (e.g. headers in C), must be included.

If it is possible, provide a link to a site where your program can be tested.

Your program must not write anything to STDERR.

Standard Loopholes are forbidden.

Your program can output in any case, but it must be printed (not an array or similar).

Scoring

Programs are scored according to bytes, in UTF-8 by default or a different character set of your choice.

Eventually, the answer with the least bytes will win.

Submissions

To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:

```<code># Language Name, N bytes
</code>```

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

```<code># Ruby, <s>104</s> <s>101</s> 96 bytes
</code>```

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:

```<code># Perl, 43 + 2 (-p flag) = 45 bytes
</code>```

You can also make the language name a link which will then show up in the leaderboard snippet:

```<code># [><>](http://esolangs.org/wiki/Fish), 121 bytes
</code>```

Leaderboard

Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.

/* Configuration */

var QUESTION_ID = 87064; // Obtain this from the url
// It will be like https://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 48934; // This should be the user ID of the challenge author.

/* App */

var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page;

function answersUrl(index) {
  return "https://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

function commentUrl(index, answers) {
  return "https://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}

function getAnswers() {
  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });
}

function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      data.items.forEach(function(c) {
        if (c.owner.user_id === OVERRIDE_USER)
          answers_hash[c.post_id].comments.push(c);
      });
      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });
}

getAnswers();

var SCORE_REG = /<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;

var OVERRIDE_REG = /^Override\s*header:\s*/i;

function getAuthorName(a) {
  return a.owner.display_name;
}

function process() {
  var valid = [];

  answers.forEach(function(a) {
    var body = a.body;
    a.comments.forEach(function(c) {
      if(OVERRIDE_REG.test(c.body))
        body = '
' + c.body.replace(OVERRIDE_REG, '') + '
';
    });

    var match = body.match(SCORE_REG);
    if (match)
      valid.push({
        user: getAuthorName(a),
        size: +match[2],
        language: match[1],
        link: a.share_link,
      });

  });

  valid.sort(function (a, b) {
    var aB = a.size,
        bB = b.size;
    return aB - bB
  });

  var languages = {};
  var place = 1;
  var lastSize = null;
  var lastPlace = 1;
  valid.forEach(function (a) {
    if (a.size != lastSize)
      lastPlace = place;
    lastSize = a.size;
    ++place;

    var answer = jQuery("#answer-template").html();
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
                   .replace("{{NAME}}", a.user)
                   .replace("{{LANGUAGE}}", a.language)
                   .replace("{{SIZE}}", a.size)
                   .replace("{{LINK}}", a.link);
    answer = jQuery(answer);
    jQuery("#answers").append(answer);

    var lang = a.language;
    if (/ b.lang) return 1;
    if (a.lang < b.lang) return -1;
    return 0;
  });

  for (var i = 0; i < langs.length; ++i)
  {
    var language = jQuery("#language-template").html();
    var lang = langs[i];
    language = language.replace("{{LANGUAGE}}", lang.lang)
                       .replace("{{NAME}}", lang.user)
                       .replace("{{SIZE}}", lang.size)
                       .replace("{{LINK}}", lang.link);
    language = jQuery(language);
    jQuery("#languages").append(language);
  }

}```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body { text-align: left !important}

#answer-list {
  padding: 10px;
  width: 290px;
  float: left;
}

#language-list {
  padding: 10px;
  width: 290px;
  float: left;
}

table thead {
  font-weight: bold;
}

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:
C, <s>78</s> <s>70</s> 67 bytes

f(i,j){for(;++i<27;puts(""))for(j=0;++j<27;putchar((i>j?i:j)+64));}

The code makes use of the following golfing techniques for C:

omit basic includes (like stdio.h)

omit (return) types of functions and variables, making them default to int

use the ternary operator instead of if-else blocks

use the ASCII code of a letter instead of its char representation (i.e. 65 instead of 'A')

use putchar to output a single character

abuse main's argument list

use puts("") to output a newline

Also, the rule If it is a function, it must be runnable by only needing to add the function call to the bottom of the program. does not forbid the function to be called with parameters (thanks to ABcDexter!).

Try it on Ideone

An ungolfed version (without any warnings with gcc) would look like this:

#include <stdio.h>

#define MAX(x, y) (x>y ? x : y)

int main()
{
    for(int i=0; i<26; i++)
    {
        for(int j=0; j<26; j++)
            printf("%c", MAX(i, j) + 'A');
        printf("\n");
    }
    return 0;
}