答:
Pyth, 10 bytes

```<code>jCm.<G~!ZG
</code>```

Demonstration

Explanation:

```<code>jCm.<G~!ZG
  m      G    Map over G, predefined to the lowercase alphabet.
              This will give 26 columns.
   .<G        Left shift (cyclically) G by
        Z     Z elements. Z is initialized to 0.
      ~!      After using its value, logical not Z. (0 -> 1, 1 -> 0)
 C            Transpose
j             Join on newlines
</code>```

Title: Print an alphabet wave

Body:
Pyth, 10 bytes

jCm.<G~!ZG

Demonstration

Explanation:

jCm.<G~!ZG
  m      G    Map over G, predefined to the lowercase alphabet.
              This will give 26 columns.
   .<G        Left shift (cyclically) G by
        Z     Z elements. Z is initialized to 0.
      ~!      After using its value, logical not Z. (0 -> 1, 1 -> 0)
 C            Transpose
j             Join on newlines


问:
Print an alphabet wave
You are to print this exact text:

```<code>ABABABABABABABABABABABABAB
BCBCBCBCBCBCBCBCBCBCBCBCBC
CDCDCDCDCDCDCDCDCDCDCDCDCD
DEDEDEDEDEDEDEDEDEDEDEDEDE
EFEFEFEFEFEFEFEFEFEFEFEFEF
FGFGFGFGFGFGFGFGFGFGFGFGFG
GHGHGHGHGHGHGHGHGHGHGHGHGH
HIHIHIHIHIHIHIHIHIHIHIHIHI
IJIJIJIJIJIJIJIJIJIJIJIJIJ
JKJKJKJKJKJKJKJKJKJKJKJKJK
KLKLKLKLKLKLKLKLKLKLKLKLKL
LMLMLMLMLMLMLMLMLMLMLMLMLM
MNMNMNMNMNMNMNMNMNMNMNMNMN
NONONONONONONONONONONONONO
OPOPOPOPOPOPOPOPOPOPOPOPOP
PQPQPQPQPQPQPQPQPQPQPQPQPQ
QRQRQRQRQRQRQRQRQRQRQRQRQR
RSRSRSRSRSRSRSRSRSRSRSRSRS
STSTSTSTSTSTSTSTSTSTSTSTST
TUTUTUTUTUTUTUTUTUTUTUTUTU
UVUVUVUVUVUVUVUVUVUVUVUVUV
VWVWVWVWVWVWVWVWVWVWVWVWVW
WXWXWXWXWXWXWXWXWXWXWXWXWX
XYXYXYXYXYXYXYXYXYXYXYXYXY
YZYZYZYZYZYZYZYZYZYZYZYZYZ
ZAZAZAZAZAZAZAZAZAZAZAZAZA
</code>```

Specs

You can print all lowercase instead of all uppercase. However, case must be consistent throughout the output.

You may print one extra trailing linefeed.

Scoring

Since this is an alphabet wave that fluctuates to a small extent, your code should also be small in terms of byte-count. In fact, the smallest code in terms of byte-count wins.

ContentLicense: CC BY-SA 3.0

Title: Print an alphabet wave

Body:
Java 8, <s>139</s> 137 bytes

()->{for(int i=65,j=1;;j++){if(j>25){j=++i<91?1:0;System.out.println();
if(j==0)break;}System.out.print((char)i+""+(char)(i>89?65:i+1));}}


答:
J, <s>20</s> 19 bytes

1 byte thanks to miles.

```<code>u:65+26|(+/2&|)i.26
</code>```

Online interpreter

This is actually the program I used to generate the text in the challenge.

Title: Print an alphabet wave

Body:
You are to print this exact text:

```<code>ABABABABABABABABABABABABAB
BCBCBCBCBCBCBCBCBCBCBCBCBC
CDCDCDCDCDCDCDCDCDCDCDCDCD
DEDEDEDEDEDEDEDEDEDEDEDEDE
EFEFEFEFEFEFEFEFEFEFEFEFEF
FGFGFGFGFGFGFGFGFGFGFGFGFG
GHGHGHGHGHGHGHGHGHGHGHGHGH
HIHIHIHIHIHIHIHIHIHIHIHIHI
IJIJIJIJIJIJIJIJIJIJIJIJIJ
JKJKJKJKJKJKJKJKJKJKJKJKJK
KLKLKLKLKLKLKLKLKLKLKLKLKL
LMLMLMLMLMLMLMLMLMLMLMLMLM
MNMNMNMNMNMNMNMNMNMNMNMNMN
NONONONONONONONONONONONONO
OPOPOPOPOPOPOPOPOPOPOPOPOP
PQPQPQPQPQPQPQPQPQPQPQPQPQ
QRQRQRQRQRQRQRQRQRQRQRQRQR
RSRSRSRSRSRSRSRSRSRSRSRSRS
STSTSTSTSTSTSTSTSTSTSTSTST
TUTUTUTUTUTUTUTUTUTUTUTUTU
UVUVUVUVUVUVUVUVUVUVUVUVUV
VWVWVWVWVWVWVWVWVWVWVWVWVW
WXWXWXWXWXWXWXWXWXWXWXWXWX
XYXYXYXYXYXYXYXYXYXYXYXYXY
YZYZYZYZYZYZYZYZYZYZYZYZYZ
ZAZAZAZAZAZAZAZAZAZAZAZAZA
</code>```

Specs

You can print all lowercase instead of all uppercase. However, case must be consistent throughout the output.

You may print one extra trailing linefeed.

Scoring

Since this is an alphabet wave that fluctuates to a small extent, your code should also be small in terms of byte-count. In fact, the smallest code in terms of byte-count wins.

Body:
J, <s>20</s> 19 bytes

1 byte thanks to miles.

u:65+26|(+/2&|)i.26

Online interpreter

This is actually the program I used to generate the text in the challenge.


Title: Print an alphabet wave

Body:
C, 60 bytes

main(i){for(;i<703;)putchar(i++%27?65+(i/27+i%27%2)%26:10);}


问:
Be respectful in the restroom
Of course, the SE network is very knowledgeable about how to be respectful in the restroom, but for those of you who need a recap, being respectful means flushing the toilet, etc. Most importantly, though, it means using the stall as far away from others as possible.

The challenge

Given a blueprint of a set of stalls with indications of which ones are in use as a string, you must return or print from a function or program where the most respectful place to do your business is.

The input

```<code> 0 1 2 3 4 5    <- The stall number which is not actually visible in the input.
| | |-| |-|-|   <- the stalls
</code>```

The stalls are numbered in ascending order from left to right. There will always be at least one empty stall. There can be up to 50 stalls in an input. You can also take the input as an array or string of 0s and 1s or booleans if you prefer to do so.

Stalls in use have - in them (in between the pipes).

The output

The most respectful stall to go to is the one that is on average farthest away from the ones in use. The distance between two stalls is the absolute value of the difference of the numbers above them.

Just to be clear: you are finding the average distance from all of the stalls—not just the neighboring ones.

You must output the lowest number of the most respectful stall to go to that is empty.

Examples

```<code>Input:
|-| |-| OR 101
Output:
1

Input:
| | |-| |-|-| OR 001011
Output:
0

Input:
|-| |-| | | | |-|-| OR 101000011
Output:
1

Input:
|-| | | | | |-|-| | | | | OR 100000110000
Output:
11

Input:
|-|-|-|-| | | | | | |-| OR 11110000001
Output:
9

Input:
|-| | OR 10
Output:
1

Input:
|-| | |-| OR 1001
Output:
1
</code>```

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

You can use 0 or 1 based indexing in your answer — whichever you prefer; if you use 1 based indexing, then you must say so explicitly in your answer.

答:
Lua, 165150 Byes

```<code>n=arg[1]n=n:gsub("%|%-","1"):gsub("%| ","0")i=0 for s in n:gmatch("0+")do i=(i<#s)and(#s)or(i)end n,l=n:find(("0"):rep(i))print(n+math.floor((l-n)/2))
</code>```

This cheats a little using the fact that generally, lua passes a table called arg containing any command line inputs to it.

I'm a bit disappointed that I used a for in loop, but I couldn't think of a smaller way to pull it off.

Also, Because lua, 1 based indexing was used.

Edit
Snipped 15 bytes from a wasteful gsub.

Title: Be respectful in the restroom

Body:
Lua, 165150 Byes

n=arg[1]n=n:gsub("%|%-","1"):gsub("%| ","0")i=0 for s in n:gmatch("0+")do i=(i<#s)and(#s)or(i)end n,l=n:find(("0"):rep(i))print(n+math.floor((l-n)/2))

This cheats a little using the fact that generally, lua passes a table called arg containing any command line inputs to it.

I'm a bit disappointed that I used a for in loop, but I couldn't think of a smaller way to pull it off.

Also, Because lua, 1 based indexing was used.

Edit
Snipped 15 bytes from a wasteful gsub.


答:
Oracle SQL 11.2, <s>141</s> 138 bytes

SELECT LISTAGG(CHR(l+64)||CHR(MOD(l,26)+65))WITHIN GROUP(ORDER BY l)FROM(SELECT CEIL(LEVEL/13)l FROM DUAL CONNECT BY LEVEL<339)GROUP BY l;
```

<p>Un-golfed</p>

<pre class="lang-sql prettyprint-override"><code>SELECT LISTAGG(CHR(l+64)||CHR(MOD(l,26)+65))WITHIN GROUP(ORDER BY l)
FROM   (
         SELECT CEIL(LEVEL/13)l
         FROM   DUAL
         CONNECT BY LEVEL<339  -- 26*13+1
       )
GROUP BY l
</code>```

Title: Print an alphabet wave

Body:
Oracle SQL 11.2, <s>141</s> 138 bytes

SELECT LISTAGG(CHR(l+64)||CHR(MOD(l,26)+65))WITHIN GROUP(ORDER BY l)FROM(SELECT CEIL(LEVEL/13)l FROM DUAL CONNECT BY LEVEL<339)GROUP BY l;

Un-golfed

SELECT LISTAGG(CHR(l+64)||CHR(MOD(l,26)+65))WITHIN GROUP(ORDER BY l)
FROM   (
         SELECT CEIL(LEVEL/13)l
         FROM   DUAL
         CONNECT BY LEVEL<339  -- 26*13+1
       )
GROUP BY l


答:
R, <s>72</s> <s>67</s> <s>60</s> 56 bytes

```<code>write(matrix(LETTERS[c(1:26,2:26,1)],26,26,T),"",26,,"")
</code>```

Thanks to @Giuseppe for the extra 4 bytes off!

Old rep-based solution at 60 bytes:

```<code>for(i in 1:26)cat(rep(LETTERS[c(i,i%%26+1)],13),"\n",sep="")
</code>```

See here on an online interpreter. Thanks to @user5957401 for the extra 7 bytes off!

Old matrix-based solution at 72 bytes:

```<code>for(i in 1:26)cat(matrix(LETTERS[c(1:26,2:26,1)],26,26)[i,],"\n",sep="")
</code>```

See here on an online interpreter.

Title: Print an alphabet wave

Body:
R, <s>72</s> <s>67</s> <s>60</s> 56 bytes

write(matrix(LETTERS[c(1:26,2:26,1)],26,26,T),"",26,,"")

Thanks to @Giuseppe for the extra 4 bytes off!

Old rep-based solution at 60 bytes:

for(i in 1:26)cat(rep(LETTERS[c(i,i%%26+1)],13),"\n",sep="")

See here on an online interpreter. Thanks to @user5957401 for the extra 7 bytes off!

Old matrix-based solution at 72 bytes:

for(i in 1:26)cat(matrix(LETTERS[c(1:26,2:26,1)],26,26)[i,],"\n",sep="")

See here on an online interpreter.


问:
Place a stone on an empty Go board
See also: Make a move on a Go board.

Task

Go is a board game where two players (Black and White) place stones on the intersections of grid lines on a 19×19 board. Black moves first — for example, on D4:

In this challenge, you must take a Go board coordinate like D4 as input, and output an ASCII representation of a board with the first move played at the given point.

Note that there is no column I. This is, historically, to reduce confusion with J and L.

This output consists of 19 lines, each containing 19 characters. The point with the stone on it is marked O. Empty points on the board are shown as ., except for the nine star points (at D4, D10, D16, K4, K10, K16, Q4, Q10, and Q16), which are marked *.

For example, given F5 as an input, your answer’s output must be:

```<code>...................
...................
...................
...*.....*.....*...
...................
...................
...................
...................
...................
...*.....*.....*...
...................
...................
...................
...................
.....O.............
...*.....*.....*...
...................
...................
...................
</code>```

And given Q16 as input, your output must be:

```<code>...................
...................
...................
...*.....*.....O...
...................
...................
...................
...................
...................
...*.....*.....*...
...................
...................
...................
...................
...................
...*.....*.....*...
...................
...................
...................
</code>```

Rules

You may write a function that takes the coordinate as an argument, or a program that reads the coordinate from the command line or from STDIN.

You may choose to accept input either in lower-case or upper-case, but your answer doesn’t need to handle both.

The input is always a single string like a1 or T19, never a string + number or two strings.

If you write a full program, your answer must be printed to STDOUT as a string, optionally followed by a trailing newline. If your answer is a function, you may print to STDOUT, or return a string, or return an array/list of strings (rows), or return a two-dimensional array or nested list of characters.

This is code-golf. The shortest answer in bytes wins.

答:
Lua, 187 Bytes

```<code>function g(i)i:gsub("(%a+)(%d+)",function(a,b)q=string.byte(a)-64 r=b+0 end)for x=1,19 do s=""for y=1,19 do s=s..(x+y*19==r+q*19 and"o"or(x-4)%6+(y-4)%6==0 and"*"or"-")end print(s)end end
</code>```

I don't feel too bad about 187 for this particular project. Lua still comes out as very clunky for Golfing, but I'm pretty proud of how far I can go with it.

Title: Place a stone on an empty Go board

Body:
Lua, 187 Bytes

function g(i)i:gsub("(%a+)(%d+)",function(a,b)q=string.byte(a)-64 r=b+0 end)for x=1,19 do s=""for y=1,19 do s=s..(x+y*19==r+q*19 and"o"or(x-4)%6+(y-4)%6==0 and"*"or"-")end print(s)end end

I don't feel too bad about 187 for this particular project. Lua still comes out as very clunky for Golfing, but I'm pretty proud of how far I can go with it.


Title: Print an alphabet wave

Body:
Brainfuck, 104 bytes

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


问:
Can you outgolf me? (Robbers section)

Robbers section

The cops section can be found here.

Challenge

Your task is to outgolf the submissions of the cops in the same language and the same version (for example, Python 3.5 ≠ Python 3.4, so that is not allowed). A submission is outgolfed when the length in bytes is shorter than the original submission. You only need to golf off at least 1 byte in order to crack a submission. E.g. if the task was to perform 2 × n, and the submission was the following:

```<code>print(2*input())
</code>```

You could outgolf the cop by doing the following:

```<code>print 2*input()
</code>```

Or even this (since lambda's are allowed):

```<code>lambda x:2*x
</code>```

Post this with the following header:

```<code>##{language name}, <s>{prev byte count}</s> {byte count}, {cop's submission + link}
</code>```

For example:

Python 2, <s>16</s> 12 bytes, Adnan (+ link to submission)

```<code>lambda x:2*x
</code>```

Computes A005843, (offset = 0).

In that case, you have cracked the submission.

Scoring

The person with who cracked the most submissions is the winner.

Rules

The crack submission must be in the same language as the cop submission.

The same input should result into the same output (so a(2) = 4 should remain 4).

For languages such as Python, you can import libraries that are standard included within the language. (So, no numpy/sympy etc.)

Input and output are both in decimal (base 10).

Note

This challenge is finished. The winner of the Robbers section is feersum. The final scores for the CnR are shown below:

feersum: 16 cracks

Dennis: 12 cracks

Leaky Nun: 6 cracks

Lynn: 4 cracks

miles: 3 cracks

Martin Ender: 2 cracks

Emigna: 2 cracks

jimmy23013: 1 crack

Sp3000: 1 crack

randomra: 1 crack

alephalpha: 1 crack

nimi: 1 crack

Destructible Watermelon: 1 crack

Dom Hastings: 1 crack

答:
Brachylog, <s>11</s> 10 bytes, Fatalize

```<code>yb:AcLrLc.
</code>```

Try it online!

Explanation

Brachylog is a Prolog-derived languages, whose greatest ability is to prove things.

Here, we prove these statements:

```<code>yb:AcLrLc.
yb:AcL       Inclusive range from 1 to input, concatenated with A, gives L
     LrL     L reversed is still L
       Lc.   L concatenated is output
</code>```

Title: Can you outgolf me? (Robbers section)

Body:
Brachylog, <s>11</s> 10 bytes, Fatalize

yb:AcLrLc.

Try it online!

Explanation

Brachylog is a Prolog-derived languages, whose greatest ability is to prove things.

Here, we prove these statements:

yb:AcLrLc.
yb:AcL       Inclusive range from 1 to input, concatenated with A, gives L
     LrL     L reversed is still L
       Lc.   L concatenated is output


答:
Jellyfish, 26 bytes

```<code>P
+'A
~
| S
+$ r2
 ,'
r'
</code>```

Note the trailing unprintable characters on the last two lines.
Try it online!

Explanation

This is basically an arithmetic manipulation approach: make a 26×26 grid with alternating 0-1 pattern, add the index of each row to every element of the row, reduce mod 26, and add the ASCII value of A.
Characters in Jellyfish are just numbers with a special flag, and all arithmetic works on them as expected.

From bottom to top:

The 's are character literals; they are followed by unprintables with ASCII code 26, and stand for those characters.

The lower r computes the character range from 0 to 25.

The , forms a pair from the two unprintable chars.

The higher r is given argument 2, and forms the range [0 1].

The $ takes that range, and reshapes it into the shape given by its other argument, which is the pair of unprintables. This gives a 26×26 matrix of alternating rows 0 1 0 1 0 1 ...

The lower + adds the char range 0-25 to this matrix. The addition distributes on the rows, so row i is incremented by i. It's also converted to a char matrix, since the south argument consists of chars.

The ~| is modulus with flipped arguments: the south argument (the above char matrix) is reduced modulo the east argument (the S turns the argument-seeking process south, so this is the unprintable literal 26).

The higher + adds the literal A to every coordinate of the resulting matrix.

The P prints the result in matrix format, that is, each row on its own line without quotes.

Title: Print an alphabet wave

Body:
Jellyfish, 26 bytes

P
+'A
~
| S
+$ r2
 ,'
r'

Note the trailing unprintable characters on the last two lines.
Try it online!

Explanation

This is basically an arithmetic manipulation approach: make a 26×26 grid with alternating 0-1 pattern, add the index of each row to every element of the row, reduce mod 26, and add the ASCII value of A.
Characters in Jellyfish are just numbers with a special flag, and all arithmetic works on them as expected.

From bottom to top:

The 's are character literals; they are followed by unprintables with ASCII code 26, and stand for those characters.

The lower r computes the character range from 0 to 25.

The , forms a pair from the two unprintable chars.

The higher r is given argument 2, and forms the range [0 1].

The $ takes that range, and reshapes it into the shape given by its other argument, which is the pair of unprintables. This gives a 26×26 matrix of alternating rows 0 1 0 1 0 1 ...

The lower + adds the char range 0-25 to this matrix. The addition distributes on the rows, so row i is incremented by i. It's also converted to a char matrix, since the south argument consists of chars.

The ~| is modulus with flipped arguments: the south argument (the above char matrix) is reduced modulo the east argument (the S turns the argument-seeking process south, so this is the unprintable literal 26).

The higher + adds the literal A to every coordinate of the resulting matrix.

The P prints the result in matrix format, that is, each row on its own line without quotes.


问:
Keep nonzeros and their neighbours
Taken from this question at Stack Overflow. Thanks also to @miles and @Dada for suggesting test inputs that address some corner cases.

The challenge

Given an array of integer values, remove all zeros that are not flanked by some nonzero value.

Equivalently, an entry should be kept either if it's a nonzero or if it's a zero that is immediately close to a nonzero value.

The entries that are kept should maintain in the output the order they had in the input.

Example

Given

```<code>[2 0 4 -3 0 0 0 3 0 0 2 0 0]
</code>```

the values that should be removed are marked with an x:

```<code>[2 0 4 -3 0 x 0 3 0 0 2 0 x]
</code>```

and so the output should be

```<code>[2 0 4 -3 0 0 3 0 0 2 0]
</code>```

Rules

The input array may be empty (and then the output should be empty too).

Input and output formats are flexible as usual: array, list, string, or anything that is reasonable.

Code golf, fewest best.

Test cases

```<code>[2 0 4 -3 0 0 0 3 0 0 2 0 0] -> [2 0 4 -3 0 0 3 0 0 2 0]
[] -> []
[1] -> [1]
[4 3 8 5 -6] -> [4 3 8 5 -6]
[4 3 8 0 5 -6] -> [4 3 8 0 5 -6]
[0] -> []
[0 0] -> []
[0 0 0 0] -> []
[0 0 0 8 0 1 0 0] -> [0 8 0 1 0]
[-5 0 5] -> [-5 0 5]
[50 0] -> [50 0]
</code>```

答:
Brachylog, <s>44</s> 38 bytes

```<code>,0gL:?:Lc:1fzbh.
~c[A:.:B],[0:0:0]'.l3
</code>```

Try it online!

This language is good as proving things, which is what we will use.

Predicate 0 (main predicate)

```<code>,0gL:?:Lc:1fzbh.
 0gL               [0] = L    (assignment works both ways)
   L:?:Lc          [L:input:L] = temp
         :1f       find all solutions of predicate 1 with temp as input
            zbh.   then transpose and take the middle row and assign to output
</code>```

Predicate 1 (auxiliary predicate)

```<code>~c[A:.:B],[0:0:0]'.l3
~c[A:.:B]                 input is in the form of [A:output:B]
         ,                and
          [0:0:0]'.       output is not [0:0:0]
                  .l3     and length of output is 3
</code>```

Title: Keep nonzeros and their neighbours

Body:
Brachylog, <s>44</s> 38 bytes

,0gL:?:Lc:1fzbh.
~c[A:.:B],[0:0:0]'.l3

Try it online!

This language is good as proving things, which is what we will use.

Predicate 0 (main predicate)

,0gL:?:Lc:1fzbh.
 0gL               [0] = L    (assignment works both ways)
   L:?:Lc          [L:input:L] = temp
         :1f       find all solutions of predicate 1 with temp as input
            zbh.   then transpose and take the middle row and assign to output

Predicate 1 (auxiliary predicate)

~c[A:.:B],[0:0:0]'.l3
~c[A:.:B]                 input is in the form of [A:output:B]
         ,                and
          [0:0:0]'.       output is not [0:0:0]
                  .l3     and length of output is 3


Title: Print an alphabet wave

Body:
Brainfuck, <s>88</s> 86 bytes

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

Requires an interpreter with 8-bit cells and a tape not bounded on the left. Try it online!


问:
Multiplify a number

Challenge description

Multiplification (totally not a made-up word) is a process in which you take two positive integers: a and b, and produce another integer which is equal to a repeated ("glued together") b times. For example, multiplifying 3 by 7 gives 3333333. Similarly, 103 multiplified by 5 is 103103103103103.

In this challenge, given two positive integers a and b, output a multiplified by b. The catch is, you can't use string operations to generate the number - it has to be done in a purely mathematical way. You may only use operators for addition (+), subtraction (-), multiplication (*), integer division (/, //, div), modulo operation (%, mod) and binary operations (&, ^, |, <<, >> etc.). It's not possible to do in every language, since it has to support arbitrary precision integers.

Sample inputs / outputs

```<code>10, 4   | 10101010
3, 9    | 333333333
3737, 2 | 37373737
993, 1  | 993
8888, 8 | 88888888888888888888888888888888
</code>```

答:
Python, 65 bytes

f=lambda x,n,p=1:p<=x and f(x,n,p*10)or n and f(x,n-1,p)*p+x or 0
```

Ideone it!

First recursion to find the power, second recursion to complete the "concatenation".

Title: Multiplify a number

Body:
Python, 65 bytes

f=lambda x,n,p=1:p<=x and f(x,n,p*10)or n and f(x,n-1,p)*p+x or 0

Ideone it!

First recursion to find the power, second recursion to complete the "concatenation".


答:
Pyth, 7 bytes

```<code>i*jQTET
</code>```

Test suite.

Convert to digit list, repeat for that many times, then convert to number.

```<code>i*jQTET  Q: first input, E: second input
  jQT    convert Q to base T (10) as a digit list
 *   E   repeat for E many times
i     T  convert from digit list to number
</code>```

Title: Multiplify a number

Body:
Challenge description

Multiplification (totally not a made-up word) is a process in which you take two positive integers: a and b, and produce another integer which is equal to a repeated ("glued together") b times. For example, multiplifying 3 by 7 gives 3333333. Similarly, 103 multiplified by 5 is 103103103103103.

In this challenge, given two positive integers a and b, output a multiplified by b. The catch is, you can't use string operations to generate the number - it has to be done in a purely mathematical way. You may only use operators for addition (+), subtraction (-), multiplication (*), integer division (/, //, div), modulo operation (%, mod) and binary operations (&, ^, |, <<, >> etc.). It's not possible to do in every language, since it has to support arbitrary precision integers.

Sample inputs / outputs

```<code>10, 4   | 10101010
3, 9    | 333333333
3737, 2 | 37373737
993, 1  | 993
8888, 8 | 88888888888888888888888888888888
</code>```

Body:
Pyth, 7 bytes

i*jQTET

Test suite.

Convert to digit list, repeat for that many times, then convert to number.

i*jQTET  Q: first input, E: second input
  jQT    convert Q to base T (10) as a digit list
 *   E   repeat for E many times
i     T  convert from digit list to number


问:
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

```

答:
C, 75 bytes

Assuming ASCII (or compatible) encoding:

```<code>F(i,j){for(i=65;i<91;++i){for(j=65;j<91;++j)putchar(j<i?i:j);putchar(10);}}
</code>```

Test main:

```<code>int main() { F(); }
</code>```

Title: Print/Output the L-phabet

Body:
C, 75 bytes

Assuming ASCII (or compatible) encoding:

F(i,j){for(i=65;i<91;++i){for(j=65;j<91;++j)putchar(j<i?i:j);putchar(10);}}

Test main:

int main() { F(); }


答:
Python 2, 48 bytes

c,n=input();a=1
while n/a:a*=10
print a**c/~-a*n
```
<p>Arithmetic!</p>
<p>Take number <code>n</code> and repetition count <code>c</code>. First, computes <code>a=10**num_digits(n)</code> as the smallest power of 10 above <code>a</code>. Then, the floor division <code>a**c/(a-1)</code> gives a number of the form <code>1001001001001</code> with <code>c</code> ones, spaced apart by the digit-length of <code>n</code>. Multiplying by <code>n</code> then replaces each <code>1</code> with <code>n</code>, giving <code>c</code> concatenated copies of <code>n</code>.</p>
<p>A same-length recursive version:</p>
<pre class="lang-python prettyprint-override"><code>f=lambda c,n,a=10:a**c/~-a*n*(a>n)or f(c,n,a*10)
</code>```

This one has to start at a=10 because a=1 causes a division-by-zero error.

Title: Multiplify a number

Body:
Python 2, 48 bytes

c,n=input();a=1
while n/a:a*=10
print a**c/~-a*n

Arithmetic!

Take number n and repetition count c. First, computes a=10**num_digits(n) as the smallest power of 10 above a. Then, the floor division a**c/(a-1) gives a number of the form 1001001001001 with c ones, spaced apart by the digit-length of n. Multiplying by n then replaces each 1 with n, giving c concatenated copies of n.

A same-length recursive version:

f=lambda c,n,a=10:a**c/~-a*n*(a>n)or f(c,n,a*10)

This one has to start at a=10 because a=1 causes a division-by-zero error.


答:
Brachylog, 9 bytes

```<code>jL,?h:.cL
</code>```

Try it online!

Explanation

The j operator concatenates the first thing in an array to itself as many times as the second thing in the array.

In other words, [10:2] would produce 101010.

This operator uses integer in the implementation so is completely usable.

However, it is one concatenation too many.

Therefore, we use the ability of Brachylog to prove things to deal with this:

```<code>jL,?h:.cL
jL          input after being treated by the j operator yields L
  ,         and
   ?h:.cL   first element of input concatenated with output is L
</code>```

Title: Multiplify a number

Body:
Brachylog, 9 bytes

jL,?h:.cL

Try it online!

Explanation

The j operator concatenates the first thing in an array to itself as many times as the second thing in the array.

In other words, [10:2] would produce 101010.

This operator uses integer in the implementation so is completely usable.

However, it is one concatenation too many.

Therefore, we use the ability of Brachylog to prove things to deal with this:

jL,?h:.cL
jL          input after being treated by the j operator yields L
  ,         and
   ?h:.cL   first element of input concatenated with output is L


答:
PHP, <s>105</s> <s>139</s> <s>136</s> 134 bytes

```<code>function m($a,$b){$s=$x=$a;for($f=10;$x>9;$x=bcdiv($x,10))$f=bcmul($f,10);for(;$b=bcsub($b,1);)$s=bcadd($s,$a=bcmul($a,$f));return$s;}
</code>```

arbitrary precision needs some room in PHP, but I´ll look if I can shrink this a bit.

Title: Multiplify a number

Body:
PHP, <s>105</s> <s>139</s> <s>136</s> 134 bytes

function m($a,$b){$s=$x=$a;for($f=10;$x>9;$x=bcdiv($x,10))$f=bcmul($f,10);for(;$b=bcsub($b,1);)$s=bcadd($s,$a=bcmul($a,$f));return$s;}

arbitrary precision needs some room in PHP, but I´ll look if I can shrink this a bit.


答:
MATLAB, <s>47</s> 38 bytes

```<code>a=(65:90)';char(repmat([a a([2:end 1])],1,13))

char(repmat([65:90;[66:90 65]]',1,13))
</code>```

The first makes a column array of the alphabet in ASCII, appends a shifted copy as a column to its right, replicates the resulting 26*2 array 13 times columnwise, casts to a character array and prints by default.

The second makes a 2*26 array of alphabet and shifted alphabet, transposes it then continues as above.

Title: Print an alphabet wave

Body:
You are to print this exact text:

```<code>ABABABABABABABABABABABABAB
BCBCBCBCBCBCBCBCBCBCBCBCBC
CDCDCDCDCDCDCDCDCDCDCDCDCD
DEDEDEDEDEDEDEDEDEDEDEDEDE
EFEFEFEFEFEFEFEFEFEFEFEFEF
FGFGFGFGFGFGFGFGFGFGFGFGFG
GHGHGHGHGHGHGHGHGHGHGHGHGH
HIHIHIHIHIHIHIHIHIHIHIHIHI
IJIJIJIJIJIJIJIJIJIJIJIJIJ
JKJKJKJKJKJKJKJKJKJKJKJKJK
KLKLKLKLKLKLKLKLKLKLKLKLKL
LMLMLMLMLMLMLMLMLMLMLMLMLM
MNMNMNMNMNMNMNMNMNMNMNMNMN
NONONONONONONONONONONONONO
OPOPOPOPOPOPOPOPOPOPOPOPOP
PQPQPQPQPQPQPQPQPQPQPQPQPQ
QRQRQRQRQRQRQRQRQRQRQRQRQR
RSRSRSRSRSRSRSRSRSRSRSRSRS
STSTSTSTSTSTSTSTSTSTSTSTST
TUTUTUTUTUTUTUTUTUTUTUTUTU
UVUVUVUVUVUVUVUVUVUVUVUVUV
VWVWVWVWVWVWVWVWVWVWVWVWVW
WXWXWXWXWXWXWXWXWXWXWXWXWX
XYXYXYXYXYXYXYXYXYXYXYXYXY
YZYZYZYZYZYZYZYZYZYZYZYZYZ
ZAZAZAZAZAZAZAZAZAZAZAZAZA
</code>```

Specs

You can print all lowercase instead of all uppercase. However, case must be consistent throughout the output.

You may print one extra trailing linefeed.

Scoring

Since this is an alphabet wave that fluctuates to a small extent, your code should also be small in terms of byte-count. In fact, the smallest code in terms of byte-count wins.

Body:
MATLAB, <s>47</s> 38 bytes

a=(65:90)';char(repmat([a a([2:end 1])],1,13))

char(repmat([65:90;[66:90 65]]',1,13))

The first makes a column array of the alphabet in ASCII, appends a shifted copy as a column to its right, replicates the resulting 26*2 array 13 times columnwise, casts to a character array and prints by default.

The second makes a 2*26 array of alphabet and shifted alphabet, transposes it then continues as above.


答:
Java 8 lambda, 268 characters

Arbitrary precision ruins everything, here are the BigIntegers:

```<code>import static java.math.BigInteger.*;import java.math.BigInteger;(a,b)->{BigInteger r=ZERO;int d=(int)(Math.log(2)/Math.log(10)*a.bitLength()+1);if(TEN.pow(d-1).compareTo(a)>0)d--;while((b=b.subtract(ONE)).compareTo(ZERO)>=0)r=r.multiply(TEN.pow(d)).add(a);return r;}
</code>```

And here the ungolfed version:

```<code>import java.math.BigInteger;

import static java.math.BigInteger.*;

public class Q89322 {

    static BigInteger expand(BigInteger a, BigInteger b) {
        BigInteger result = ZERO;

        int digitCount = (int) (Math.log(2) / Math.log(10) * a.bitLength() + 1);
        if (TEN.pow(digitCount - 1).compareTo(a) > 0) {
            digitCount--;
        }
        while ((b = b.subtract(ONE)).compareTo(ZERO) >= 0) {
            result = result.multiply(TEN.pow(digitCount)).add(a);
        }
        return result;
    }
}
</code>```

I hope that logarithm is also counted as a valid mathematical operation :)

Getting the digits of the BigIntegers powered by this guy. With only int or long this could be way shorter :/

Title: Multiplify a number

Body:
Java 8 lambda, 268 characters

Arbitrary precision ruins everything, here are the BigIntegers:

import static java.math.BigInteger.*;import java.math.BigInteger;(a,b)->{BigInteger r=ZERO;int d=(int)(Math.log(2)/Math.log(10)*a.bitLength()+1);if(TEN.pow(d-1).compareTo(a)>0)d--;while((b=b.subtract(ONE)).compareTo(ZERO)>=0)r=r.multiply(TEN.pow(d)).add(a);return r;}

And here the ungolfed version:

import java.math.BigInteger;

import static java.math.BigInteger.*;

public class Q89322 {

    static BigInteger expand(BigInteger a, BigInteger b) {
        BigInteger result = ZERO;

        int digitCount = (int) (Math.log(2) / Math.log(10) * a.bitLength() + 1);
        if (TEN.pow(digitCount - 1).compareTo(a) > 0) {
            digitCount--;
        }
        while ((b = b.subtract(ONE)).compareTo(ZERO) >= 0) {
            result = result.multiply(TEN.pow(digitCount)).add(a);
        }
        return result;
    }
}

I hope that logarithm is also counted as a valid mathematical operation :)

Getting the digits of the BigIntegers powered by this guy. With only int or long this could be way shorter :/


答:
JavaScript (ES7), 43 bytes

```<code>f=(a,b,c=1)=>c>a?(c**b-1)/~-c*a:f(a,b,c*10)
</code>```

Works up to f(9000,4). (Looks like I rediscovered @xnor's formula.) 56-byte ES6 version or 52-byte ES6 version with an even smaller range:

```<code>f=(a,b,c=0,d=0)=>c<a?f(a,b,c*10+9,d*(b='1e'+b)+--b):d/c*a
f=(a,b,c=1,d=1)=>c>a?~-d/~-c*a:f(a,b,c*10,d*='1e'+b)
</code>```

Title: Multiplify a number

Body:
JavaScript (ES7), 43 bytes

f=(a,b,c=1)=>c>a?(c**b-1)/~-c*a:f(a,b,c*10)

Works up to f(9000,4). (Looks like I rediscovered @xnor's formula.) 56-byte ES6 version or 52-byte ES6 version with an even smaller range:

f=(a,b,c=0,d=0)=>c<a?f(a,b,c*10+9,d*(b='1e'+b)+--b):d/c*a
f=(a,b,c=1,d=1)=>c>a?~-d/~-c*a:f(a,b,c*10,d*='1e'+b)


答:
Common Lisp, 73 bytes

```<code>(lambda(a b)(loop for x below b sum(*(expt 10(*(ceiling(log a 10))x))a)))
</code>```

Title: Multiplify a number

Body:
Common Lisp, 73 bytes

(lambda(a b)(loop for x below b sum(*(expt 10(*(ceiling(log a 10))x))a)))


答:
Haskell, 38 bytes

n%c|a<-until(>n)(*10)1=n*div(a^c)(a-1)
```

Everyone forgets about until!

Title: Multiplify a number

Body:
Haskell, 38 bytes

n%c|a<-until(>n)(*10)1=n*div(a^c)(a-1)

Everyone forgets about until!


问:
Smile! Just smile
It's well known that Brainf*ck is very bad at Kolmogorov-complexity problems, for example, it requires around 100 characters just to print "Hello world".

However, there might be texts where Brainf*ck is just very good at.

Your task is now to write a program that takes no input, and it displays the following:

```<code>☺
</code>```

That is, a smiley face (ASCII 1, if you browser does not render it).

Brainf*ck can do it in 2 characters.

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

Try to find a language that beats it!

We assume your console can actually display that character (or your font has it, etc.).

Shortest code wins. If there are more of the same length, the first wins, but I'll upvote the others as well.

EDIT: I'm very sorry, I did not think the first post arrives this soon. A quick edit: the language has to be Turing-complete!

答:
Brainf*ck (only 2 characters)

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

Title: Smile! Just smile

Body:
Brainf*ck (only 2 characters)

+.


Title: Print an alphabet wave

Body:
Javascript(ES5), 107 99 bytes

for(var s="",i=-1;++i<676;)i&&!(i%26)&&(s+="\n"),s+=String.fromCharCode((i/26+i%2)%26+65);alert(s);


答:
PHP, 280 268 263 261 255 218 216 bytes

```<code><?php $a=ucfirst($argv[1]);$x=substr($a,0,1);$y=substr($a,1);$s=['DKQ',4,16,10];$i=85;while(64<$i--){$j=0;while($j++<20){echo($x==chr($i)&&$y==$j)?'O':((strpos($s[0],chr($i))>-1&&in_array($j,$s))?'*':'.');}echo"\n";}
</code>```

My first golf.

Usage:

Save as a PHP file and call it by php filename.php coordinate e.g. php go.php k13

Title: Place a stone on an empty Go board

Body:
See also: Make a move on a Go board.

Task

Go is a board game where two players (Black and White) place stones on the intersections of grid lines on a 19×19 board. Black moves first — for example, on D4:

In this challenge, you must take a Go board coordinate like D4 as input, and output an ASCII representation of a board with the first move played at the given point.

Note that there is no column I. This is, historically, to reduce confusion with J and L.

This output consists of 19 lines, each containing 19 characters. The point with the stone on it is marked O. Empty points on the board are shown as ., except for the nine star points (at D4, D10, D16, K4, K10, K16, Q4, Q10, and Q16), which are marked *.

For example, given F5 as an input, your answer’s output must be:

```<code>...................
...................
...................
...*.....*.....*...
...................
...................
...................
...................
...................
...*.....*.....*...
...................
...................
...................
...................
.....O.............
...*.....*.....*...
...................
...................
...................
</code>```

And given Q16 as input, your output must be:

```<code>...................
...................
...................
...*.....*.....O...
...................
...................
...................
...................
...................
...*.....*.....*...
...................
...................
...................
...................
...................
...*.....*.....*...
...................
...................
...................
</code>```

Rules

You may write a function that takes the coordinate as an argument, or a program that reads the coordinate from the command line or from STDIN.

You may choose to accept input either in lower-case or upper-case, but your answer doesn’t need to handle both.

The input is always a single string like a1 or T19, never a string + number or two strings.

If you write a full program, your answer must be printed to STDOUT as a string, optionally followed by a trailing newline. If your answer is a function, you may print to STDOUT, or return a string, or return an array/list of strings (rows), or return a two-dimensional array or nested list of characters.

This is code-golf. The shortest answer in bytes wins.

Body:
PHP, 280 268 263 261 255 218 216 bytes

<?php $a=ucfirst($argv[1]);$x=substr($a,0,1);$y=substr($a,1);$s=['DKQ',4,16,10];$i=85;while(64<$i--){$j=0;while($j++<20){echo($x==chr($i)&&$y==$j)?'O':((strpos($s[0],chr($i))>-1&&in_array($j,$s))?'*':'.');}echo"\n";}

My first golf.

Usage:

Save as a PHP file and call it by php filename.php coordinate e.g. php go.php k13


答:
k, 20 bytes

Same idea as Pyth solution.

Only supports up to 64 bit signed int range.

```<code>{10/:(y*#d)#d:10\:x}
</code>```

Example

```<code>k){10/:(y*#d)#d:10\:x}[103;2]
103103
</code>```

Title: Multiplify a number

Body:
k, 20 bytes

Same idea as Pyth solution.

Only supports up to 64 bit signed int range.

{10/:(y*#d)#d:10\:x}

Example

k){10/:(y*#d)#d:10\:x}[103;2]
103103


答:
Jelly, 3 bytes

```<code>DẋḌ
</code>```

Try it online!

```<code>DẋḌ  Main chain, argument: x,y
D    Convert x to list of digits
 ẋ   repeat y times
  Ḍ  Convert back to number
</code>```

Title: Multiplify a number

Body:
Jelly, 3 bytes

DẋḌ

Try it online!

DẋḌ  Main chain, argument: x,y
D    Convert x to list of digits
 ẋ   repeat y times
  Ḍ  Convert back to number


问:
Is it truthy or falsy?
There are so many different ways to express whether something is true or not! The goal of this challenge is to produce a standardized output of truthy or falsy for various input truthy and falsy values.

For the purposes of this challenge, the following inputs are considered truthy:

A string representing a signed integer with a non-zero value (contains only the digits [0-9], with an optional - at the beginning). Note that the string -0 will never be given as input. A non-zero integer will never be preceded by a 0 (i.e. 01 will never be given as input, similarly -01 will never be gien as input).

The case-insensitive strings equivalent to one of defined, found, nonnil, non-nil, on, success, t, true, y, and yes

For the purposes of this challenge, the following inputs are considered falsy:

The string 0. Repeated zeros (00, 00...) will never be given as input.

An empty string

The case-insensitive strings equivalent to one of f, failure, false, n, nan, nil, no, notfound, not-found, null, nullptr, off, and undefined

Input

The input is a string representing a truthy/falsy value. The string may come from any source desired (stdio, function parameter, etc.). There is no leading/trailing whitespace.

The input is guaranteed to match one of the allowed truthy/falsy values above (i.e. you do not need to provide any error handling).

Output

Your program/function must output a truthy/falsy value which represents the "truthy-ness" or "falsy-ness" of the input.
You are only allowed to specify exactly 1 truthy and 1 falsy value which your output must convert the input to (these are your "standardized" truthy/falsy value). The output may be written to any sink desired (stdio, return value, output parameter, etc.).

Please specify what truthy and falsy value you chose in your answer.

Ex.: If you choose the string true as a truthy value, you cannot also have the integer 1 for truthy.

Test Cases

Test cases are formatted as the first line is the input, and the second line is the output.

```<code>-1
true

1
true

1234
true

-4321
true

defined
true

deFined
true

Found
true

nonnil
true

non-nil
true

ON
true

SuCCess
true

T
true

true
true

y
true

YeS
true

0
false

'' (empty string)
false

faLSE
false

f
false

Failure
false

n
false

NaN
false

nil
false

no
false

notfound
false

not-Found
false

NULL
false

nullptr
false

OFF
false

unDefined
false
</code>```

Scoring

This is code-golf; shortest code in bytes wins. Standard loopholes apply. You may use any built-ins desired.

答:
Python, <s>129</s> <s>79</s> 78 bytes

Gotta submit fast!

```<code>lambda n:n.lower()[:3]in" 0 f n no nil fai fal nan not nul off und".split(" ")
</code>```

True is false and false is true; I have a nice rhyme for this, I really do (not)

Title: Is it truthy or falsy?

Body:
Python, <s>129</s> <s>79</s> 78 bytes

Gotta submit fast!

lambda n:n.lower()[:3]in" 0 f n no nil fai fal nan not nul off und".split(" ")

True is false and false is true; I have a nice rhyme for this, I really do (not)


答:
Python, 111 bytes

def b(s):s=s.lower();return s!='no'and not sum(map(ord,s))in[0,48,323,744,523,877,110,785,443,922,315,317,946]
```

Tests on sum of ASCII values, extra check for no since on has the same value.

Edit1: forgot to test on integer values. Now checking for false inputs

Title: Is it truthy or falsy?

Body:
There are so many different ways to express whether something is true or not! The goal of this challenge is to produce a standardized output of truthy or falsy for various input truthy and falsy values.

For the purposes of this challenge, the following inputs are considered truthy:

A string representing a signed integer with a non-zero value (contains only the digits [0-9], with an optional - at the beginning). Note that the string -0 will never be given as input. A non-zero integer will never be preceded by a 0 (i.e. 01 will never be given as input, similarly -01 will never be gien as input).

The case-insensitive strings equivalent to one of defined, found, nonnil, non-nil, on, success, t, true, y, and yes

For the purposes of this challenge, the following inputs are considered falsy:

The string 0. Repeated zeros (00, 00...) will never be given as input.

An empty string

The case-insensitive strings equivalent to one of f, failure, false, n, nan, nil, no, notfound, not-found, null, nullptr, off, and undefined

Input

The input is a string representing a truthy/falsy value. The string may come from any source desired (stdio, function parameter, etc.). There is no leading/trailing whitespace.

The input is guaranteed to match one of the allowed truthy/falsy values above (i.e. you do not need to provide any error handling).

Output

Your program/function must output a truthy/falsy value which represents the "truthy-ness" or "falsy-ness" of the input.
You are only allowed to specify exactly 1 truthy and 1 falsy value which your output must convert the input to (these are your "standardized" truthy/falsy value). The output may be written to any sink desired (stdio, return value, output parameter, etc.).

Please specify what truthy and falsy value you chose in your answer.

Ex.: If you choose the string true as a truthy value, you cannot also have the integer 1 for truthy.

Test Cases

Test cases are formatted as the first line is the input, and the second line is the output.

```<code>-1
true

1
true

1234
true

-4321
true

defined
true

deFined
true

Found
true

nonnil
true

non-nil
true

ON
true

SuCCess
true

T
true

true
true

y
true

YeS
true

0
false

'' (empty string)
false

faLSE
false

f
false

Failure
false

n
false

NaN
false

nil
false

no
false

notfound
false

not-Found
false

NULL
false

nullptr
false

OFF
false

unDefined
false
</code>```

Scoring

This is code-golf; shortest code in bytes wins. Standard loopholes apply. You may use any built-ins desired.

Body:
Python, 111 bytes

def b(s):s=s.lower();return s!='no'and not sum(map(ord,s))in[0,48,323,744,523,877,110,785,443,922,315,317,946]

Tests on sum of ASCII values, extra check for no since on has the same value.

Edit1: forgot to test on integer values. Now checking for false inputs


答:
MATL, 20 bytes

```<code>U|sG36ZA13\[BID1]m+g
</code>```

Input is a string enclosed in single quotes. Output is 1 for truthy or 0 for falsy.

Try it online! Or verify all test cases.

How it works

```<code>U|s      % Take input implicitly. Interpret as number, absolute value, sum
G36ZA    % Push input again. Convert from base-36
13\      % Modulo 13
[BID1]   % Push array [6 3 8 1]
m        % True if member: gives 1 iff the result from modulo 13 is in the array
+g       % Add, convert to logical. Display implicitly
</code>```

This performs two tests on the input:

Try to interpret the input as a number, and detect if it is nonzero. The function used to interpret a string as a number outputs an empty array if it's not possible; and the sum of the entries of an empty array is 0. So it suffices to try the conversion, take the absolute value, and sum. This gives a positive value if the input contains a nonzero number, and 0 otherwise.

Assuming the input string doesn't represent a number, we need to classify it into one of the two given sets. To do this, the input is interpreted as the digits of a number expressed in base-36, using alphabet '01...9ab...z'. The base conversion function is case-insensitive and ignores digits not present in the alphabet (in our case, '-'). It turns out that the modulo 13 of the resulting number is 1, 3, 6 or 8 for the truthy strings, and doesn't give any of those values for the falsy strings. So it can be used as a signature. We thus perform modulo 13 and see if the result is any of those four values. This gives 1 if it is, or 0 otherwise.

The final result should be truthy if any of the two conditions is met, and falsy otherwise. So we add the two numbers resulting from 1 and 2 above and convert to logical, which gives 1 or 0 as standardized truthy/falsy values.

Title: Is it truthy or falsy?

Body:
MATL, 20 bytes

U|sG36ZA13\[BID1]m+g

Input is a string enclosed in single quotes. Output is 1 for truthy or 0 for falsy.

Try it online! Or verify all test cases.

How it works

U|s      % Take input implicitly. Interpret as number, absolute value, sum
G36ZA    % Push input again. Convert from base-36
13\      % Modulo 13
[BID1]   % Push array [6 3 8 1]
m        % True if member: gives 1 iff the result from modulo 13 is in the array
+g       % Add, convert to logical. Display implicitly

This performs two tests on the input:

Try to interpret the input as a number, and detect if it is nonzero. The function used to interpret a string as a number outputs an empty array if it's not possible; and the sum of the entries of an empty array is 0. So it suffices to try the conversion, take the absolute value, and sum. This gives a positive value if the input contains a nonzero number, and 0 otherwise.

Assuming the input string doesn't represent a number, we need to classify it into one of the two given sets. To do this, the input is interpreted as the digits of a number expressed in base-36, using alphabet '01...9ab...z'. The base conversion function is case-insensitive and ignores digits not present in the alphabet (in our case, '-'). It turns out that the modulo 13 of the resulting number is 1, 3, 6 or 8 for the truthy strings, and doesn't give any of those values for the falsy strings. So it can be used as a signature. We thus perform modulo 13 and see if the result is any of those four values. This gives 1 if it is, or 0 otherwise.

The final result should be truthy if any of the two conditions is met, and falsy otherwise. So we add the two numbers resulting from 1 and 2 above and convert to logical, which gives 1 or 0 as standardized truthy/falsy values.


答:
JavaScript (ES6), 35 <s>39</s>

Edit using the n?on trick, stolen from BusinessCat's answer

Edit 2 OP clarified, no leading 0s, saved 4 bytes

v=>/^([-1-9dsty]|fo|n?on)/i.test(v)
```
<p>Simply returns <code>true</code> or <code>false</code></p>
<p><strong>Test</strong></p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>f=v=>/^([-1-9dsty]|fo|n?on)/i.test(v)

trues=[-1,1,1234,-4321,'defined','deFined','Found',
'nonnil','non-nil','ON','SuCCess','T','true','y','YeS']
falses=[0,'','faLSE','f','Failure','n','NaN','nil',
'no','notfound','not-Found','NULL','nullptr','OFF','unDefined']

console.log('TRUE: '+trues.map(x=>f(x)))

console.log('FALSE:' +falses.map(x=>f(x)))</code>```

Title: Is it truthy or falsy?

Body:
JavaScript (ES6), 35 <s>39</s>

Edit using the n?on trick, stolen from BusinessCat's answer

Edit 2 OP clarified, no leading 0s, saved 4 bytes

v=>/^([-1-9dsty]|fo|n?on)/i.test(v)

Simply returns true or false

Test

f=v=>/^([-1-9dsty]|fo|n?on)/i.test(v)

trues=[-1,1,1234,-4321,'defined','deFined','Found',
'nonnil','non-nil','ON','SuCCess','T','true','y','YeS']
falses=[0,'','faLSE','f','Failure','n','NaN','nil',
'no','notfound','not-Found','NULL','nullptr','OFF','unDefined']

console.log('TRUE: '+trues.map(x=>f(x)))

console.log('FALSE:' +falses.map(x=>f(x)))


答:
Mathematica, 53 bytes

```<code>MaximalBy[a=PositionIndex@#;a@0,Tr@Abs[#-a@1]&][[1]]&
</code>```

Uses 1-based indexing and takes input as a list of 0s and 1s.

Title: Be respectful in the restroom

Body:
Of course, the SE network is very knowledgeable about how to be respectful in the restroom, but for those of you who need a recap, being respectful means flushing the toilet, etc. Most importantly, though, it means using the stall as far away from others as possible.

The challenge

Given a blueprint of a set of stalls with indications of which ones are in use as a string, you must return or print from a function or program where the most respectful place to do your business is.

The input

```<code> 0 1 2 3 4 5    <- The stall number which is not actually visible in the input.
| | |-| |-|-|   <- the stalls
</code>```

The stalls are numbered in ascending order from left to right. There will always be at least one empty stall. There can be up to 50 stalls in an input. You can also take the input as an array or string of 0s and 1s or booleans if you prefer to do so.

Stalls in use have - in them (in between the pipes).

The output

The most respectful stall to go to is the one that is on average farthest away from the ones in use. The distance between two stalls is the absolute value of the difference of the numbers above them.

Just to be clear: you are finding the average distance from all of the stalls—not just the neighboring ones.

You must output the lowest number of the most respectful stall to go to that is empty.

Examples

```<code>Input:
|-| |-| OR 101
Output:
1

Input:
| | |-| |-|-| OR 001011
Output:
0

Input:
|-| |-| | | | |-|-| OR 101000011
Output:
1

Input:
|-| | | | | |-|-| | | | | OR 100000110000
Output:
11

Input:
|-|-|-|-| | | | | | |-| OR 11110000001
Output:
9

Input:
|-| | OR 10
Output:
1

Input:
|-| | |-| OR 1001
Output:
1
</code>```

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

You can use 0 or 1 based indexing in your answer — whichever you prefer; if you use 1 based indexing, then you must say so explicitly in your answer.

Body:
Mathematica, 53 bytes

MaximalBy[a=PositionIndex@#;a@0,Tr@Abs[#-a@1]&][[1]]&

Uses 1-based indexing and takes input as a list of 0s and 1s.


答:
Neoscript, 62 bytes (non-competing)

```<code>a='A:[]:'Zeach n=0:[]:25console:log(a[n]*n+a:slice(n):fuse());
</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:
Neoscript, 62 bytes (non-competing)

a='A:[]:'Zeach n=0:[]:25console:log(a[n]*n+a:slice(n):fuse());


问:
Add without addition (or any of the 4 basic arithmetic operators)
Problem:

Your goal is to add two input numbers without using any of the following math operators: +,-,*,/.

Additionally, you can't use any built-in functions that are designed to replace those math operators.

Scoring:

Smallest code (in number of bytes) wins.

Update

Most of the programs i've seen either concatenate two arrays containing their numbers, or make first number of a character, append second number characters, then count them all.

Shortest array counter: APL with 8 chars, by Tobia

Shortest array concatenation: Golfscript with 4 chars, by Doorknob

Shortest logarithmic solution: TI-89 Basic with 19 chars, by Quincunx

Integration solution: Mathematica with 45 chars, by Michael Stern

Coolest, in my opinion: bitwise operators in javascript, by dave

答:
PHP, <s>91</s> <s>78</s> 51 bytes

bit logic and shifting ... what else?

```<code>function p($x,$y){return$y?p($x^$y,($x&$y)<<1):$x;}
</code>```

also works for negative integers

Body:
PHP, <s>91</s> <s>78</s> 51 bytes

bit logic and shifting ... what else?

function p($x,$y){return$y?p($x^$y,($x&$y)<<1):$x;}

also works for negative integers


问:
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

```

答:
Piet, 247 bytes/190 codels

Try it Online!

So, this took far longer than I had anticipated, and I have a few ideas on some other more efficient (more stack-friendly) approaches, but I finally got the dang thing working (and fixed an interpreter bug and added IDE features along the way), so here it is.  Hardly the most byte-efficient language, but a hell of a lot of fun.  Here's a larger view, and a trace showing the path taken.  History up on my GitHub.

As a stack-based language, it's far too convoluted to explain briefly, but here's a basic overview of what the various sections/loops do. All variable and function names are just for explanation, as there are  no variables or functions in Piet.

Initialization (upper-left): starts line_counter at 27, loads '@' as cur_letter, sets letter_count to 27

Main loop (starting at dark purple, center top)

Decrements letter_counter

Branches to reset_line if zero (light cyan 2-block)

Rolls cur_letter to the top of the stack

Branches to check_done if cur_letter > 'X' (teal/red block, right side)

Increments cur_letter and outputs it (lower-right corner)

Branches to reset_letter if cur_letter > 'Y' (light green block, left)

Rolls `letter_counter_ back to top of stack, back to top of loop

reset_line branch (big pink square):

Outputs newline character

Resets letter_count to 27

Continues back to top of main loop

check_done branch (right half inside)

Rolls line_counter to top

Branches to end if zero

Decrements line_counter and rolls back to bottom of stack

Resumes where it left off, printing letter

reset_line branch (left side, green block):

Resets cur_letter to '@'

Resumes where it left off, rolling/returning to top of loop

ContentLicense: CC BY-SA 4.0

Title: Print a Tabula Recta!

Body:
Piet, 247 bytes/190 codels

<a href="https://tio.run/#%23fZRLbxQxEITv/IoSSChC0LI9tsfmgJIoUTYIhRASRBCHeF6wJxKF/79U27t5XLBmLO/I/rqqu7236/nvZmPaeI@UEQz8DN/DTDAFtuhszO6Z4DN8gvcIDpDzsxPZjtPV0cWLCrJEPRxx8cnxAJNg3OOXEhEZKxMl8loexi9pKEdUtE8IHfoO3qmM4CutPtOA2cIvmA1QlHB/eHpZUZ@3qO6pKkbsjRoJWYHbjwPs87WqktvV9f1OV0N5RVVVuSCPsOmRzC@aIg9vVaFLsAEhNFRL1NHB5Z5cNVQgarRIVnM7dugqpC2WCf2CHNDNmDqkEcVrBirK1Ec@PKqKRAWWzCnKOSSn686qQZY1e3QOQ4exGh9H1YkfIi9F7P25OJGVnDZUT9TA2o1afTfpKa7ToHbGSc/SPg36ukG7wlLVW3nHd4@CDj7xbahElKUpr0oC0ztjyJiobVZJMWDK2hi0xrJGA6sosV9rrma@hzdbg1mbIcJXL4zLsyxfTEgGKcIZxAVd1kTZWPM/Ass@Kde/RfAnU9TPhipETdyQkCN6qwWaipJTj5g1b4k2I/KC4hQYtUW/y92V7Mu61XHdUANRLLp2MnuScYuqSiRnvSNERadRqJb8YDUcDa6/fbwWuZBB5v0vdw01agU97FiDOj3OnxqdCezh2BVxm0y6awtol19cyo28ivS3a4aJKCbcFd2Z68ySFZ7yGJntUEtZ9Kb7oFeSEWHfHCiBY09OjneoWSvoMXEb79eidrqgbbA4JTDzz26oqX2lkCHoXG/jtq8WohhO/2E8yrytOJ3@bxyfHWkPbDb/AA" rel="nofollow noreferrer">Try it Online!

So, this took far longer than I had anticipated, and I have a few ideas on some other more efficient (more stack-friendly) approaches, but I finally got the dang thing working (and fixed an interpreter bug and added IDE features along the way), so here it is.  Hardly the most byte-efficient language, but a hell of a lot of fun.  Here's a larger view, and a trace showing the path taken.  History up on my GitHub.

As a stack-based language, it's far too convoluted to explain briefly, but here's a basic overview of what the various sections/loops do. All variable and function names are just for explanation, as there are  no variables or functions in Piet.

Initialization (upper-left): starts line_counter at 27, loads '@' as cur_letter, sets letter_count to 27

Main loop (starting at dark purple, center top)

Decrements letter_counter

Branches to reset_line if zero (light cyan 2-block)

Rolls cur_letter to the top of the stack

Branches to check_done if cur_letter > 'X' (teal/red block, right side)

Increments cur_letter and outputs it (lower-right corner)

Branches to reset_letter if cur_letter > 'Y' (light green block, left)

Rolls `letter_counter_ back to top of stack, back to top of loop

reset_line branch (big pink square):

Outputs newline character

Resets letter_count to 27

Continues back to top of main loop

check_done branch (right half inside)

Rolls line_counter to top

Branches to end if zero

Decrements line_counter and rolls back to bottom of stack

Resumes where it left off, printing letter

reset_line branch (left side, green block):

Resets cur_letter to '@'

Resumes where it left off, rolling/returning to top of loop


答:
Batch, 142 bytes

```<code>@goto l%1 2>nul
:l
:l0
:lfailure
:lfalse
:ln
:lnan
:lnil
:lno
:lnotfound
:lnot-found
:lnull
:lnullptr
:loff
:lundefined
@echo 1
</code>```

Outputs 1 for falsy, nothing for truthy.

Title: Is it truthy or falsy?

Body:
Batch, 142 bytes

@goto l%1 2>nul
:l
:l0
:lfailure
:lfalse
:ln
:lnan
:lnil
:lno
:lnotfound
:lnot-found
:lnull
:lnullptr
:loff
:lundefined
@echo 1

Outputs 1 for falsy, nothing for truthy.


问:
Alphabet triangle
You are to print this exact text:

```<code>A
ABA
ABCBA
ABCDCBA
ABCDEDCBA
ABCDEFEDCBA
ABCDEFGFEDCBA
ABCDEFGHGFEDCBA
ABCDEFGHIHGFEDCBA
ABCDEFGHIJIHGFEDCBA
ABCDEFGHIJKJIHGFEDCBA
ABCDEFGHIJKLKJIHGFEDCBA
ABCDEFGHIJKLMLKJIHGFEDCBA
ABCDEFGHIJKLMNMLKJIHGFEDCBA
ABCDEFGHIJKLMNONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRSRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRSTSRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRSTUTSRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRSTUVUTSRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRSTUVWVUTSRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRSTUVWXWVUTSRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRSTUVWXYXWVUTSRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRSTUVWXYZYXWVUTSRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRSTUVWXYXWVUTSRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRSTUVWXWVUTSRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRSTUVWVUTSRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRSTUVUTSRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRSTUTSRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRSTSRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRSRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQRQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPQPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNOPONMLKJIHGFEDCBA
ABCDEFGHIJKLMNONMLKJIHGFEDCBA
ABCDEFGHIJKLMNMLKJIHGFEDCBA
ABCDEFGHIJKLMLKJIHGFEDCBA
ABCDEFGHIJKLKJIHGFEDCBA
ABCDEFGHIJKJIHGFEDCBA
ABCDEFGHIJIHGFEDCBA
ABCDEFGHIHGFEDCBA
ABCDEFGHGFEDCBA
ABCDEFGFEDCBA
ABCDEFEDCBA
ABCDEDCBA
ABCDCBA
ABCBA
ABA
A
</code>```

Specs

Extra trailing newlines are allowed at the end of the output.

Extra trailing spaces (U+0020) are allowed at the end of each line, including the extra trailing newlines.

You can use all lowercase instead of all uppercase, but you cannot print partially lowercase partially uppercase.

You can return the text as a function output instead of printing it in a full program.

Scoring

Since this is a triangle, and a triangle has 3 sides, and 3 is a small number, your code should be small in terms of byte-count.

答:
Brachylog, <s>37</s> 29 bytes

Credits to Fatalize for his assistance throughout.

4 bytes thanks to Fatalize, and inspiration for another 4 bytes.

```<code>@A:1&e:"a"yr:1&cw@Nw\
:Lc.r.!
</code>```

Try it online!

Predicate 0 (Main predicate)

```<code>@A:1&e:"a"yr:1&cw@Nw\
@A:1&                  Apply predicate 1 to @A, which is
                       basically "abcdefghijklmnopqrstuvwxyz"
     e                 Choose one element from the result (choice point)
      :"a"yr               generate substring from element to "a"
            :1&            apply predicate 1
               c           concatenate
                w          write to STDOUT
                 @Nw       write "\n" to STDOUT
                    \  Backtrack to last choice point to choose
                       another element until there is no more
                       choice left, then halt.
</code>```

Predicate 1 (Auxiliary predicate)

This basically builds a palindrome from the given string.

```<code>:Lc.r.!
:Lc.     output is [input:L]
   .r.   output reversed is still output
      !  stop searching after the first output
</code>```

Title: Alphabet triangle

Body:
Brachylog, <s>37</s> 29 bytes

Credits to Fatalize for his assistance throughout.

4 bytes thanks to Fatalize, and inspiration for another 4 bytes.

@A:1&e:"a"yr:1&cw@Nw\
:Lc.r.!

Try it online!

Predicate 0 (Main predicate)

@A:1&e:"a"yr:1&cw@Nw\
@A:1&                  Apply predicate 1 to @A, which is
                       basically "abcdefghijklmnopqrstuvwxyz"
     e                 Choose one element from the result (choice point)
      :"a"yr               generate substring from element to "a"
            :1&            apply predicate 1
               c           concatenate
                w          write to STDOUT
                 @Nw       write "\n" to STDOUT
                    \  Backtrack to last choice point to choose
                       another element until there is no more
                       choice left, then halt.

Predicate 1 (Auxiliary predicate)

This basically builds a palindrome from the given string.

:Lc.r.!
:Lc.     output is [input:L]
   .r.   output reversed is still output
      !  stop searching after the first output


答:
T-SQL 133 Bytes (Golfed by : @t-clausen.dk)

```<code>SELECT REPLICATE(Char(number+65)+IIF(number=25,'A',Char(number+66)),13)FROM spt_values WHERE number<26and'P'=TYPE
</code>```

T-SQL , 151 Bytes

Using CTE to generate sequence of number

```<code>;WITH n(a,v) AS(SELECT CHAR(65)+CHAR(66), 66 UNION ALL SELECT CHAR(v)+CHAR(v+1), v+1 FROM n WHERE v < 91)SELECT REPLICATE(REPLACE(a,'[','A'),13) FROM n
</code>```

T-SQL, 155 Bytes

```<code>SELECT REPLICATE(Char(number+65)+ CASE WHEN number=25 THEN 'A' ELSE Char(number+66) END, 13) FROM master.dbo.spt_values  WHERE name IS NULL AND number < 26
</code>```

Title: Print an alphabet wave

Body:
You are to print this exact text:

```<code>ABABABABABABABABABABABABAB
BCBCBCBCBCBCBCBCBCBCBCBCBC
CDCDCDCDCDCDCDCDCDCDCDCDCD
DEDEDEDEDEDEDEDEDEDEDEDEDE
EFEFEFEFEFEFEFEFEFEFEFEFEF
FGFGFGFGFGFGFGFGFGFGFGFGFG
GHGHGHGHGHGHGHGHGHGHGHGHGH
HIHIHIHIHIHIHIHIHIHIHIHIHI
IJIJIJIJIJIJIJIJIJIJIJIJIJ
JKJKJKJKJKJKJKJKJKJKJKJKJK
KLKLKLKLKLKLKLKLKLKLKLKLKL
LMLMLMLMLMLMLMLMLMLMLMLMLM
MNMNMNMNMNMNMNMNMNMNMNMNMN
NONONONONONONONONONONONONO
OPOPOPOPOPOPOPOPOPOPOPOPOP
PQPQPQPQPQPQPQPQPQPQPQPQPQ
QRQRQRQRQRQRQRQRQRQRQRQRQR
RSRSRSRSRSRSRSRSRSRSRSRSRS
STSTSTSTSTSTSTSTSTSTSTSTST
TUTUTUTUTUTUTUTUTUTUTUTUTU
UVUVUVUVUVUVUVUVUVUVUVUVUV
VWVWVWVWVWVWVWVWVWVWVWVWVW
WXWXWXWXWXWXWXWXWXWXWXWXWX
XYXYXYXYXYXYXYXYXYXYXYXYXY
YZYZYZYZYZYZYZYZYZYZYZYZYZ
ZAZAZAZAZAZAZAZAZAZAZAZAZA
</code>```

Specs

You can print all lowercase instead of all uppercase. However, case must be consistent throughout the output.

You may print one extra trailing linefeed.

Scoring

Since this is an alphabet wave that fluctuates to a small extent, your code should also be small in terms of byte-count. In fact, the smallest code in terms of byte-count wins.

Body:
T-SQL 133 Bytes (Golfed by : @t-clausen.dk)

SELECT REPLICATE(Char(number+65)+IIF(number=25,'A',Char(number+66)),13)FROM spt_values WHERE number<26and'P'=TYPE

T-SQL , 151 Bytes

Using CTE to generate sequence of number

;WITH n(a,v) AS(SELECT CHAR(65)+CHAR(66), 66 UNION ALL SELECT CHAR(v)+CHAR(v+1), v+1 FROM n WHERE v < 91)SELECT REPLICATE(REPLACE(a,'[','A'),13) FROM n

T-SQL, 155 Bytes

SELECT REPLICATE(Char(number+65)+ CASE WHEN number=25 THEN 'A' ELSE Char(number+66) END, 13) FROM master.dbo.spt_values  WHERE name IS NULL AND number < 26


答:
Retina, <s>22</s> <s>24</s> 23 bytes

Saved 1 byte thanks to edc65

```<code>i`^([-1-9sdty]|fo|n?on)
</code>```

The whole code is just a regex. The i` at the start makes the regex case insensitive.

Outputs 1 for truthy, 0 for falsey.

Try it online!

Title: Is it truthy or falsy?

Body:
Retina, <s>22</s> <s>24</s> 23 bytes

Saved 1 byte thanks to edc65

i`^([-1-9sdty]|fo|n?on)

The whole code is just a regex. The i` at the start makes the regex case insensitive.

Outputs 1 for truthy, 0 for falsey.

Try it online!


答:
PowerShell v2+, <s>39</s> 37 bytes

```<code>$args[0]-match'^([-1-9dsty]|fo|n?on)'
</code>```

Presumes that the answer to @feersum's question is "No, truthy integers may not start with a 0."

Port of @edc65's regex JavaScript answer, with my own 1-9 substitution instead of \d. Uses @BusinessCat's n?on trick to golf further.

Outputs literal Boolean $true or $false values, which when left on the pipeline and sent through an implicit Write-Output at the end of execution results in True or False being printed to the console.

If the answer is "Yes, truthy integers can start with 0," then the following changes need to be made for <s>51</s> 49 bytes

```<code>param($n)$n-ne0-and$n-match'^([-\ddsty]|fo|n?on)'
</code>```

If you don't like regex, go for PowerShell v3+ and the following at 107 bytes

```<code>param($n)$n-and$n-notin-split'0 f failure false n nan nil no notfound not-found null nullptr off undefined'
</code>```

This takes the string of falsey values, -splits them on whitespace, and uses the -notin operator to check the input $n against that array of strings (which is, by default, case-insensitive). Requires the $n-and to check against the empty string.

Title: Is it truthy or falsy?

Body:
PowerShell v2+, <s>39</s> 37 bytes

$args[0]-match'^([-1-9dsty]|fo|n?on)'

Presumes that the answer to @feersum's question is "No, truthy integers may not start with a 0."

Port of @edc65's regex JavaScript answer, with my own 1-9 substitution instead of \d. Uses @BusinessCat's n?on trick to golf further.

Outputs literal Boolean $true or $false values, which when left on the pipeline and sent through an implicit Write-Output at the end of execution results in True or False being printed to the console.

If the answer is "Yes, truthy integers can start with 0," then the following changes need to be made for <s>51</s> 49 bytes

param($n)$n-ne0-and$n-match'^([-\ddsty]|fo|n?on)'

If you don't like regex, go for PowerShell v3+ and the following at 107 bytes

param($n)$n-and$n-notin-split'0 f failure false n nan nil no notfound not-found null nullptr off undefined'

This takes the string of falsey values, -splits them on whitespace, and uses the -notin operator to check the input $n against that array of strings (which is, by default, case-insensitive). Requires the $n-and to check against the empty string.


Title: Print an alphabet wave

Body:
Neoscript, 59 bytes

a=('A:[]:'Z)+'Aeach n=0:[]:25console:log((a[n]+a[n+1])*13);


答:
05AB1E, 12 bytes

```<code>ADÀ)øvyJ5Ø×,
</code>```

Explanation

```<code>AD            # push 2 copies of the alphabet
  À           # rotate the 2nd one left by 1
   )ø         # add to list and zip
     v        # for each
      yJ      # join the pair
        5Ø×   # repeat it 13 times
           ,  # print with newline
</code>```

Try it online

Title: Print an alphabet wave

Body:
05AB1E, 12 bytes

ADÀ)øvyJ5Ø×,

Explanation

AD            # push 2 copies of the alphabet
  À           # rotate the 2nd one left by 1
   )ø         # add to list and zip
     v        # for each
      yJ      # join the pair
        5Ø×   # repeat it 13 times
           ,  # print with newline

Try it online


答:
RETURN, 23 bytes

```<code>'A'[␊'B'[␊'A␈13␋␄'␊°␇␂,
</code>```

Try it here.

NOTE: Use the "Insert String" button and paste the above code in.

Explanation

Basically generates A-Z and B-Z and A at the end on the stack. Then the stack is duplicated 13 times, transposed, joined with a newline, and outputted.

Due to a bug that I just can't fix, 'A'[␊${25@}13␋␄'␊°␇␂, does not work.

Title: Print an alphabet wave

Body:
RETURN, 23 bytes

'A'[␊'B'[␊'A␈13␋␄'␊°␇␂,

Try it here.

NOTE: Use the "Insert String" button and paste the above code in.

Explanation

Basically generates A-Z and B-Z and A at the end on the stack. Then the stack is duplicated 13 times, transposed, joined with a newline, and outputted.

Due to a bug that I just can't fix, 'A'[␊${25@}13␋␄'␊°␇␂, does not work.


答:
Snowman, <s>50</s> 44 bytes, Doorknob

```<code>((}#2nMNdE0nR1`wRaC2aGaZ::nM;aF;aM:`nS;aF*))
</code>```

Try it online!

Title: Can you outgolf me? (Robbers section)

Body:
Robbers section

The cops section can be found here.

Challenge

Your task is to outgolf the submissions of the cops in the same language and the same version (for example, Python 3.5 ≠ Python 3.4, so that is not allowed). A submission is outgolfed when the length in bytes is shorter than the original submission. You only need to golf off at least 1 byte in order to crack a submission. E.g. if the task was to perform 2 × n, and the submission was the following:

```<code>print(2*input())
</code>```

You could outgolf the cop by doing the following:

```<code>print 2*input()
</code>```

Or even this (since lambda's are allowed):

```<code>lambda x:2*x
</code>```

Post this with the following header:

```<code>##{language name}, <s>{prev byte count}</s> {byte count}, {cop's submission + link}
</code>```

For example:

Python 2, <s>16</s> 12 bytes, Adnan (+ link to submission)

```<code>lambda x:2*x
</code>```

Computes A005843, (offset = 0).

In that case, you have cracked the submission.

Scoring

The person with who cracked the most submissions is the winner.

Rules

The crack submission must be in the same language as the cop submission.

The same input should result into the same output (so a(2) = 4 should remain 4).

For languages such as Python, you can import libraries that are standard included within the language. (So, no numpy/sympy etc.)

Input and output are both in decimal (base 10).

Note

This challenge is finished. The winner of the Robbers section is feersum. The final scores for the CnR are shown below:

feersum: 16 cracks

Dennis: 12 cracks

Leaky Nun: 6 cracks

Lynn: 4 cracks

miles: 3 cracks

Martin Ender: 2 cracks

Emigna: 2 cracks

jimmy23013: 1 crack

Sp3000: 1 crack

randomra: 1 crack

alephalpha: 1 crack

nimi: 1 crack

Destructible Watermelon: 1 crack

Dom Hastings: 1 crack

Body:
Snowman, <s>50</s> 44 bytes, Doorknob

((}#2nMNdE0nR1`wRaC2aGaZ::nM;aF;aM:`nS;aF*))

Try it online!


答:
C# - 159 138 bytes

```<code>var a="ABCDEFGHIJKLMNOPQRSTUVWXYZA";for(int i=0;i<26;i++){for(int j=0;j<14;j++){Console.Write("{0}{1}",a[i],a[i+1]);}Console.WriteLine();}
</code>```

Title: Print an alphabet wave

Body:
C# - 159 138 bytes

var a="ABCDEFGHIJKLMNOPQRSTUVWXYZA";for(int i=0;i<26;i++){for(int j=0;j<14;j++){Console.Write("{0}{1}",a[i],a[i+1]);}Console.WriteLine();}


答:
Javascript (using external library Enumerable) (84 bytes)

```<code>    n=>(w=_.Range(0,26)).WriteLine(x=>w.Write("",y=>String.fromCharCode((x+y%2)%26+65)))
</code>```

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

Code explanation: Create a range of ints starting at 0 for count of 26. Store into global variable w. For each, write a new line according to predicate. Predicate states to take "w" and write a joined string based off the passed predicate to Write. Predicate to Write uses an empty string as the join delimiter, and uses the current integer value from WriteLine ("x") and the current integer value from Write ("y") to calculate the correct string at that position

Edit: Removed extra parens to save 2 bytes

Title: Print an alphabet wave

Body:
Javascript (using external library Enumerable) (84 bytes)

    n=>(w=_.Range(0,26)).WriteLine(x=>w.Write("",y=>String.fromCharCode((x+y%2)%26+65)))

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

Code explanation: Create a range of ints starting at 0 for count of 26. Store into global variable w. For each, write a new line according to predicate. Predicate states to take "w" and write a joined string based off the passed predicate to Write. Predicate to Write uses an empty string as the join delimiter, and uses the current integer value from WriteLine ("x") and the current integer value from Write ("y") to calculate the correct string at that position

Edit: Removed extra parens to save 2 bytes


问:
Stock Time Machine

Stock Time Machine

You've gained access to a dataset, tomorrowStocks, which contains the stock prices from your favorite business on the NASDAQ. This dataset is a container indexed by minutes past opening. Each index contains the price of the stock at that time.

```<code>// Assume the stock market opens at 9:30AM EDT
// tomorrowStocks[] contains the prices of your target stock.
// If the stock is $22 @ 10:30AM EDT
tomorrowStocks[60] == 22
</code>```

Output

Your task is to determine the best possible outcome of 1 purchase and 1 sale of 1 stock from the given dataset.

Gotchas

You must buy and sell exactly 1 stock.

You may not buy and sell in the same time slot.

You must buy before you sell.

Test Data

```<code>[1,2,3,4,5]    # 4
[1,99,2,105]   # 104
[99,1,99,100]  # 99
[99,1,1,2,1,3] # 2
[5,4,3,3,1]    # 0
[5,4,3,1]      # -1
[5,2,1]        # -1
[5,4,1]        # -1
[55,45,20,1]   # -10
[5,1]          # -4
[10,7,5,1]     # -2
[7]            # Invalid input -- assume size >= 2
</code>```

This is a code-golf; submit the shortest answer in your favorite language!

答:
C, 101 99 Bytes

```<code>int i,j,m,h;int f(int*a){m=1<<31;for(;a[i];i++){for(j=i+1;a[j];h=a[j++]-a[i],m=h<m?m:h);}return m;}
</code>```

Input: null terminated array. E.g. {1,2,3,4,5,0}

Output: returns the best outcome

You can save 8 bytes (93 91 total) if you never want to lose money:

```<code>int i,j,m,h;int f(int*a){for(;a[i];i++){for(j=i+1;a[j];h=a[j++]-a[i],m=h<m?m:h);}return m;}
</code>```

Title: Stock Time Machine

Body:
C, 101 99 Bytes

int i,j,m,h;int f(int*a){m=1<<31;for(;a[i];i++){for(j=i+1;a[j];h=a[j++]-a[i],m=h<m?m:h);}return m;}

Input: null terminated array. E.g. {1,2,3,4,5,0}

Output: returns the best outcome

You can save 8 bytes (93 91 total) if you never want to lose money:

int i,j,m,h;int f(int*a){for(;a[i];i++){for(j=i+1;a[j];h=a[j++]-a[i],m=h<m?m:h);}return m;}


答:
JAVA 9, <s>103</s> 97 bytes

it works on JShell, provided by Java9 SDK.

```<code>for(int c=64,i;++c<91;)for(i=0;i<26;)System.out.print((char)((c-13+i%2)%26+65)+(i++<25?"":"\n"))
</code>```

Title: Print an alphabet wave

Body:
JAVA 9, <s>103</s> 97 bytes

it works on JShell, provided by Java9 SDK.

for(int c=64,i;++c<91;)for(i=0;i<26;)System.out.print((char)((c-13+i%2)%26+65)+(i++<25?"":"\n"))


答:
Pyke, 13 bytes

```<code>GGt\a+]w-*,_X
</code>```

Try it here!

Title: Print an alphabet wave

Body:
Pyke, 13 bytes

GGt\a+]w-*,_X

Try it here!


Title: Print an alphabet wave

Body:
TSQL, 111 bytes

DECLARE @o varchar(702)='',@ int=1WHILE @<702SELECT @o+=CHAR(IIF(@%27=0,10,65+(@/27+1-@%27%2)%26)),@+=1PRINT @o

Fiddle


问:
The smallest Chess arbiter
Write a program, which, upon gazing at a chess table, can say whether there is a check or a checkmate.

Input: a chess table in text form, the last line of the input being the first rank (the starting line of White)

The starting position in this input would look like this (space is an empty square, capital letters are White): why aren't the spaces displayed here?

```<code>rnbqkbnr
pppppppp

PPPPPPPP
RNBQKBNR
</code>```

The program should print one or more of the following (without quotes, of course), depending on the situation:

"The White King is in check!" (if already in checkmate, don't display this!)

"The Black King is in check!" (if already in checkmate, don't display this!)

"The White King is in checkmate!"

"The Black King is in checkmate!"

"White is in stalemate!" (There would be a stalemate if White moved - optional)

"Black is in stalemate!" (There would be a stalemate if Black moved - optional)

"Both kings are safe for now." (if none of the above apply)

The input is guaranteed to be correct and be a legal chess position (no two kings of the same color, no two kings in check, etc.).

Score:

The score is the character count, lowest wins, not sooner than 10 days after the first valid answer. If the optional stalemate evaluation is implemented, the size will be decreased by 20% (for this situation, assume en-passant cannot be performed).

Title: The smallest Chess arbiter

Body:
C, 837-20%=669.6 chars

Based on this answer. You can see some explanations about the implementation there.

The original is golfed quite well, the modifications not so much, so there's room for improvement.

I also wouldn't be surprised to find bugs, my QA wasn't very rigorous.

char*r=" KPNBRQ  kpnbrq $ ,&)$wxy()879()8(6:GI(",B[256],*b=B,i,Q,s,*X[]={"Stalemate","Checkmate","","Check"};
e(x,d,m,V,c,r,n,p){
    p=b[x];
    return(m/r?
        n=x+d*r,
        p-2-8*(d<0)&&!(n&136)&&(b[n]?r=8,p&8^b[n]&8&&c&65^64:c&65^65)&&
        ((V?v(n,x):b[n]%8==1&&(s&=~((b[n]>7?8:2)))),e(x,d,m,V,c,r+1))
    :0)||d>0&&e(x,-d,m,V,c,1);
}
d(x,v,m,i)char*m;{
    (i=*m-40)? e(x,i%64,b[x]%8-2?b[x]&4?7:1:(x/16-1)%5|i%2?1:2,v,i,1),d(x,v,m+1):0;
}
v(t,f){
    b[t]%8-1?
        (s&(b[f]>7?8:2))==0?
            bcopy(B,b+=128,128),
            s|=(b[f]>7?8:2),
            b[f]^=b[t]=b[f],
            a(b[t]<8,63),
            b=B
        :0
    :
        (s|=b[f]>7?1:4);
}
a(c,n){
    b[i=n*2-n%8]&&b[i]/8==c?d(i,!Q++,r+r[b[i]%8+15]-10),Q--:0;n--&&a(c,n);
}
p(c,t){
    return(t=c?s%4:s/4)!=2&&printf("%s%s%s is in %s\n",t?"The ":"",c?"White":"Black",t?" king":"",X[t]);
}
main(){
    for(;gets(b);b+=8)for(;*b;b++)*b=strchr(r,*b)-r;b=B;
    a(0,63);
    a(1,63);
    p(0)||p(8)||puts("Both kings are safe for now");
}


答:
Vim, 31 bytes

```<code>:h<_↵↵↵YZZPJra0qqy2l13Plr↵25@qD
</code>```

Where ↵ is the Return key.

Title: Print an alphabet wave

Body:
Vim, 31 bytes

:h<_↵↵↵YZZPJra0qqy2l13Plr↵25@qD

Where ↵ is the Return key.