答:
ES6, 91 bytes

```<code>(n,a=[i=1])=>a[n]||f(n,a.every((_,j)=>(j+=2)>new Set(b.map(e=>e%j)).size,b=[...a,+++])?b:a)
</code>```

Zero-indexed. Due to its recursive nature, only works for the first 450 terms, but computes a(99)=583 almost instantly.

Title: The infinitely admissable sequence

Body:
In this challenge we'll compute an infinite minimal admissible sequence.

The sequence for this challenge starts with a(1) = 1.

We continue this sequence by finding a(n) as the smallest possible number such that a(n) > a(n-1) and for every prime p, the set {a(i) mod p : 1 ≤ i ≤ n} has at most p-1 elements.

Write a program or function that takes positive integer n and outputs a(n). Shortest code in bytes wins.

Example:

a(6) is 19, rather than, say 17 because [1,3,7,9,13,19] (the previous terms) is admissible while [1,3,7,9,13,17] is not.

[1,3,7,9,13,17] is not admissible, because for the base 3, after taking the modulo of each term with 3, we obtain [1,0,1,0,1,2] which contains every non-negative number smaller than 3, our chosen base.

For [1,3,7,9,13,19] however, it would be impossible to come up with a base such that the list after modulo contains every non-negative integer smaller than such base.

Reference:

OEIS A020498

Testcases:

```<code>a(1) = 1
a(2) = 3
a(3) = 7
a(4) = 9
a(5) = 13
a(6) = 19
a(7) = 21
a(8) = 27
a(9) = 31
a(10) = 33
a(100) = 583
</code>```

Body:
ES6, 91 bytes

(n,a=[i=1])=>a[n]||f(n,a.every((_,j)=>(j+=2)>new Set(b.map(e=>e%j)).size,b=[...a,+++])?b:a)

Zero-indexed. Due to its recursive nature, only works for the first 450 terms, but computes a(99)=583 almost instantly.


问:
Smallest positive integer which is coprime to the last two predecessors and has not yet appeared; a(1)=1, a(2)=2

Definition

Two integers are coprime if they share no positive common divisors other than 1.

a(1) = 1

a(2) = 2

a(n) is the smallest positive integer which is coprime to the a(n-1) and a(n-2) and has not yet appeared, for integer n >= 3.

Task

Given positive integer n, output/print a(n).

Example

a(11) = 6 because 6 is coprime with the last two predecessors (namely, 11 and 13) and 6 has not appeared before.

Notes

Note that the sequence is not ascending, meaning that an element can be smaller than its predecessor.

Specs

You must use 1-indexed.

Testcases

```<code>n      a(n)
1      1
2      2
3      3
4      5
5      4
6      7
7      9
8      8
9      11
10     13
11     6
12     17
13     19
14     10
15     21
16     23
17     16
18     15
19     29
20     14
100    139
1000   1355
10000  13387
100000 133361
</code>```

Scoring

Since coprime means that the two numbers share only one divisor (1), and 1 is a small number, your code should be as small as possible in terms of byte-count.

References

OEIS A084937

ContentLicense: CC BY-SA 3.0

Body:
C, 185 bytes

G(a,b){return a%b?G(b,a%b):b;}
i,j,k;f(n){int a[n+2];for(i=0;i++<n;){a[i]=i<3?i:0;for(j=2;!a[i];++j){for(k=i;--k;){if(a[k]==j)++j,k=i;}a[G(a[i-1],j)*G(a[i-2],j)<2?i:0]=j;}}return a[n];}


问:
Numbers of purity
Today we'll look at a sequence \$a\$, related to the Collatz function \$f\$:

$$f = \begin{cases}
n/2  & \text{if } n \equiv 0 \text{ (mod }2) \\
3n+1 & \text{if } n \equiv 1 \text{ (mod }2) \\
\end{cases}$$

We call a sequence of the form \$z, f(z), f(f(z)), …\$ a Collatz sequence.

The first number in our sequence, \$a(1)\$, is \$0\$. Under repeated application of \$f\$, it falls into a cycle \$0\to0\to0\to\:\cdots\$

The smallest number we haven't seen yet is 1, making \$a(2)=1\$. Under repeated application of \$f\$, it falls into a cycle \$1\to4\to2\to1\to\cdots\$

Now we have seen the number \$2\$ in the cycle above, so the next smallest number is \$a(3) = 3\$, falling into the cycle \$3\to10\to5\to16\to8\to4\to2\to1\to4\to\cdots\$

In all above cycles we've seen \$4\$ and \$5\$ already, so the next number is \$a(4) = 6\$.

By now you should get the idea. \$a(n)\$ is the smallest number that was not part of any Collatz sequences for all \$a(1), ..., a(n-1)\$

Write a program or function that, given an positive integer \$n\$, returns \$a(n)\$. Shortest code in bytes wins.

Testcases:

```<code>1  -> 0
2  -> 1
3  -> 3
4  -> 6
5  -> 7
6  -> 9
7  -> 12
8  -> 15
9  -> 18
10 -> 19
50 -> 114
</code>```

(This is OEIS sequence A061641.)

答:
Mathematica, 134 bytes

```<code>f=If[EvenQ@#,#/2,3#+1]&;a@n_:=(b={i=c=0};While[i++<n-1,c=First[Range@Max[#+1]~Complement~#&@b];b=b~Union~NestWhileList[f,c,f@#>c&]];c)
</code>```

Easier-to-read format:

```<code>f = If[EvenQ@#, #/2, 3#+1] &;                        Collatz function
a@n_ := (                                            defines a(n)
  b = {i = c = 0};                                   initializations
                                                       b is the growing sequence
                                                       of cycles already completed
  While[i++ < n - 1,                                 computes a(n) recursively
    c = First[Range@Max[# + 1]~Complement~# & @b];   smallest number not in b
    b = b~Union~NestWhileList[f, c, f@# > c &]       apply f to c repeatedly
                                                       until the answer is smaller
                                                       than c, then add this new
                                                       cycle to b
    ]
  ; c)                                                 output final value of c
</code>```

ContentLicense: CC BY-SA 4.0

Title: Numbers of purity

Body:
Mathematica, 134 bytes

f=If[EvenQ@#,#/2,3#+1]&;a@n_:=(b={i=c=0};While[i++<n-1,c=First[Range@Max[#+1]~Complement~#&@b];b=b~Union~NestWhileList[f,c,f@#>c&]];c)

Easier-to-read format:

f = If[EvenQ@#, #/2, 3#+1] &;                        Collatz function
a@n_ := (                                            defines a(n)
  b = {i = c = 0};                                   initializations
                                                       b is the growing sequence
                                                       of cycles already completed
  While[i++ < n - 1,                                 computes a(n) recursively
    c = First[Range@Max[# + 1]~Complement~# & @b];   smallest number not in b
    b = b~Union~NestWhileList[f, c, f@# > c &]       apply f to c repeatedly
                                                       until the answer is smaller
                                                       than c, then add this new
                                                       cycle to b
    ]
  ; c)                                                 output final value of c


问:
Verify a ballot triangle
A ballot number, which we'll label B, is the number of ways of arranging the numbers from 1 through B(B+1)/2 into a triangle, such that each row and column is in any increasing order. The first four ballot numbers are:

```<code>a(0) = 1
a(1) = 1
a(2) = 1
a(3) = 2
</code>```

a(3) is 2, which means that there are 2 ways of arranging the numbers from 1 to 3(3+1)/2 = 6 in such a triangle:

```<code>1          1
2 3    or  2 4
4 5 6      3 5 6
</code>```

See the OEIS sequence entry for more details.

Your challenge, given a ballot triangle, is to verify its correctness. If it satisfies the conditions of a ballot triangle (rows and columns increasing), you should output how many other ways (excluding the one in the input) there are to arrange the triangle correctly. If the input triangle is incorrectly constructed, you should output nothing.

Trailing newlines are allowed.

Input

A triangle of numbers, which may or may not be a valid ballot triangle. For example:

```<code>1
2 3
4 5 6

1
10 5
9 8 2
7 6 4 3

1
3 2

9
2 11
14 3 5
12 8 1 7
15 13 10 4 6

1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
16 17 18 19 20 21
</code>```

Output

If the input is a valid ballot triangle, the remaining number of ways to arrange the same numbers in a valid ballot triangle. If the input is not a valid ballot triangle, nothing. For example, the inputs above produce these outputs (<nothing> is a placeholder for an actual empty output):

```<code>1                     # the same as a(3)-1

<nothing>

<nothing>

<nothing>

33591                 # the same as a(6)-1
</code>```

Scoring

This is code-golf: as usual, lowest byte-count wins. Tiebreaker is earliest posted.

答:
Brachylog, 44 bytes

```<code>{:{o?}a,?z:2a},?ly+yb:3flw
p~c.:laBtybB,.:1&
</code>```

Try it online!

This runs in double-exponential time, so for truthy testcases you would need to believe me that it theoretically produces the correct result, for triangles with length greater than or equal to 3.

You can still test for falsey testcases, those should terminate rather quickly.

Title: Verify a ballot triangle

Body:
Brachylog, 44 bytes

{:{o?}a,?z:2a},?ly+yb:3flw
p~c.:laBtybB,.:1&

Try it online!

This runs in double-exponential time, so for truthy testcases you would need to believe me that it theoretically produces the correct result, for triangles with length greater than or equal to 3.

You can still test for falsey testcases, those should terminate rather quickly.


问:
Percent-Encode a String

Introduction

As some of you may know, URLs actually have a list of characters that do special things. For example, the / character separates parts of the URL, and the ?, &, and = characters are used to pass query parameters to the server. In fact, there is a bunch of characters with special functions: $&+,/:;=?@. When you need to use these characters in the URL for any other reason besides the special functions, you have to do something called percent-encoding.

Percent encoding is when you take a character's hexadecimal value and prepend a % character to the beginning of it. For example, the character ? would be encoded as %3F, and the character & would be encoded as %26. In a URL specifically, this allows you to send these characters as data via the URL without causing parsing problems. Your challenge will be to take a string, and percent-encode all of the characters that need to be encoded.

The Challenge

You shall write a program or function that takes in a single string consisting of characters with codepoints 00-FF (ASCII and Extended ASCII characters). You will then have to output or return the same string with each character percent-encoded if necessary. Built-ins that accomplish this task are not allowed, nor are standard loopholes. For reference, here is a list of every character that needs to be percent encoded:

Control characters (Codepoints 00-1F and 7F)

Extended ASCII characters (Codepoints 80-FF)

Reserved characters ($&+,/:;=?@, i.e. codepoints 24, 26, 2B, 2C, 2F, 3A, 3B, 3D, 3F, 40)

Unsafe characters (" <>#%{}|\^~[]`, i.e. codepoints 20, 22, 3C, 3E, 23, 25, 7B, 7D, 7C, 5C, 5E, 7E, 5B, 5D, 60)

Here is a the same list, but instead as a list of decimal codepoints:

```<code>0-31, 32, 34, 35, 36, 37, 38, 43, 44, 47, 58, 59, 60, 62, 61, 63, 64, 91, 92, 93, 94, 96, 123, 124, 125, 126, 127, 128-255
</code>```

This is code golf, so shortest code in bytes (or approved alternative scoring method) wins!

Test Cases

```<code>http://codegolf.stackexchange.com/  =>  http%3A%2F%2Fcodegolf.stackexchange.com%2F
[@=>]{#}  =>  %5B%40%3D%3E%5D%7B%23%7D
Test String  =>  Test%20String
ÑÉÐÔ®  =>  %D1%C9%D0%D4%AE
  =>  %0F%16%7F (Control characters 0F, 16, and 7F)
 ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ  =>  %80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F%90%91%92%93%94%95%96%97%98%99%9A%9B%9C%9D%9E%9F%A0%A1%A2%A3%A4%A5%A6%A7%A8%A9%AA%AB%AC%AD%AE%AF%B0%B1%B2%B3%B4%B5%B6%B7%B8%B9%BA%BB%BC%BD%BE%BF%C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF%D0%D1%D2%D3%D4%D5%D6%D7%D8%D9%DA%DB%DC%DD%DE%DF%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE%EF%F0%F1%F2%F3%F4%F5%F6%F7%F8%F9%FA%FB%FC%FD%FE%FF (Extended ASCII characters 80-FF)
 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  =>  %20!%22%23%24%25%26'()*%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7E
</code>```

Title: Percent-Encode a String

Body:
Julia, 47 bytes

!s=replace(s,r"[^\w!'()*.-]",c->"%"hex(c[1],2))

Try it online!


答:
Pyth, 30 28 26 bytes

```<code>L?hx+G+rG1CGbb+\%.HCbsmydz
</code>```

try it online

Explanation

```<code>L?hx+G+rG1CGbb+\%.HCbsmydz
L?hx+G+rG1CGbb+\%.HCb       First part, L defines the function y(b)
 ?hx+G+rG1CGbb+\%.HCb       ? is the ternary operator
  hx+G+rG1CGb               This part will be evaluated
  hx                        x will find the first occurence of a
                            character in a list. If it doesn't
                            find one, it will return -1. hx then
                            equals 0 (or false).
    +G+rG1CG                The list of allowed characters, a
                            concetanation (+) of the alphabet (G),
                            uppercase alphabet (rG1) and numbers
                            (CG, see below for details)
            b               The character to find in the list
             b              True branch of the ternary operator,
                            the character is allowed and returned.
              +\%.HCb       False branch, convert to hex and add %
                     smydz  The actual program
                      mydz  Map every character in the input (z)
                            using the function y on every d
                     s      Join the array, and implicit print.
</code>```

CG is this trick that generate a huge number that contains all possible digits. This is perfect, since we don't care for duplicates when checking whether a string is in another.

Title: Percent-Encode a String

Body:
Introduction

As some of you may know, URLs actually have a list of characters that do special things. For example, the / character separates parts of the URL, and the ?, &, and = characters are used to pass query parameters to the server. In fact, there is a bunch of characters with special functions: $&+,/:;=?@. When you need to use these characters in the URL for any other reason besides the special functions, you have to do something called percent-encoding.

Percent encoding is when you take a character's hexadecimal value and prepend a % character to the beginning of it. For example, the character ? would be encoded as %3F, and the character & would be encoded as %26. In a URL specifically, this allows you to send these characters as data via the URL without causing parsing problems. Your challenge will be to take a string, and percent-encode all of the characters that need to be encoded.

The Challenge

You shall write a program or function that takes in a single string consisting of characters with codepoints 00-FF (ASCII and Extended ASCII characters). You will then have to output or return the same string with each character percent-encoded if necessary. Built-ins that accomplish this task are not allowed, nor are standard loopholes. For reference, here is a list of every character that needs to be percent encoded:

Control characters (Codepoints 00-1F and 7F)

Extended ASCII characters (Codepoints 80-FF)

Reserved characters ($&+,/:;=?@, i.e. codepoints 24, 26, 2B, 2C, 2F, 3A, 3B, 3D, 3F, 40)

Unsafe characters (" <>#%{}|\^~[]`, i.e. codepoints 20, 22, 3C, 3E, 23, 25, 7B, 7D, 7C, 5C, 5E, 7E, 5B, 5D, 60)

Here is a the same list, but instead as a list of decimal codepoints:

```<code>0-31, 32, 34, 35, 36, 37, 38, 43, 44, 47, 58, 59, 60, 62, 61, 63, 64, 91, 92, 93, 94, 96, 123, 124, 125, 126, 127, 128-255
</code>```

This is code golf, so shortest code in bytes (or approved alternative scoring method) wins!

Test Cases

```<code>http://codegolf.stackexchange.com/  =>  http%3A%2F%2Fcodegolf.stackexchange.com%2F
[@=>]{#}  =>  %5B%40%3D%3E%5D%7B%23%7D
Test String  =>  Test%20String
ÑÉÐÔ®  =>  %D1%C9%D0%D4%AE
  =>  %0F%16%7F (Control characters 0F, 16, and 7F)
 ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ  =>  %80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F%90%91%92%93%94%95%96%97%98%99%9A%9B%9C%9D%9E%9F%A0%A1%A2%A3%A4%A5%A6%A7%A8%A9%AA%AB%AC%AD%AE%AF%B0%B1%B2%B3%B4%B5%B6%B7%B8%B9%BA%BB%BC%BD%BE%BF%C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF%D0%D1%D2%D3%D4%D5%D6%D7%D8%D9%DA%DB%DC%DD%DE%DF%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE%EF%F0%F1%F2%F3%F4%F5%F6%F7%F8%F9%FA%FB%FC%FD%FE%FF (Extended ASCII characters 80-FF)
 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  =>  %20!%22%23%24%25%26'()*%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7E
</code>```

Body:
Pyth, 30 28 26 bytes

L?hx+G+rG1CGbb+\%.HCbsmydz

try it online

Explanation

L?hx+G+rG1CGbb+\%.HCbsmydz
L?hx+G+rG1CGbb+\%.HCb       First part, L defines the function y(b)
 ?hx+G+rG1CGbb+\%.HCb       ? is the ternary operator
  hx+G+rG1CGb               This part will be evaluated
  hx                        x will find the first occurence of a
                            character in a list. If it doesn't
                            find one, it will return -1. hx then
                            equals 0 (or false).
    +G+rG1CG                The list of allowed characters, a
                            concetanation (+) of the alphabet (G),
                            uppercase alphabet (rG1) and numbers
                            (CG, see below for details)
            b               The character to find in the list
             b              True branch of the ternary operator,
                            the character is allowed and returned.
              +\%.HCb       False branch, convert to hex and add %
                     smydz  The actual program
                      mydz  Map every character in the input (z)
                            using the function y on every d
                     s      Join the array, and implicit print.

CG is this trick that generate a huge number that contains all possible digits. This is perfect, since we don't care for duplicates when checking whether a string is in another.


答:
Haskell, 201 179 178 127 119 bytes

import Data.Char;import Numeric;f=(=<<)(\c->if isAlphaNum c&&isAscii c||elem c"-_.~"then[c]else '%':(showHex$ord c)"")
```

<p>Ungolfed:</p>

<pre class="lang-haskell prettyprint-override"><code>import Data.Char
import Numeric

f=(=<<) e
e c = if isAlphaNum c && isAscii c && c `elem` "-_.~" then [c] else '%' : (showHex $ ord c) ""
</code>```

Title: Percent-Encode a String

Body:
Haskell, 201 179 178 127 119 bytes

import Data.Char;import Numeric;f=(=<<)(\c->if isAlphaNum c&&isAscii c||elem c"-_.~"then[c]else '%':(showHex$ord c)"")

Ungolfed:

import Data.Char
import Numeric

f=(=<<) e
e c = if isAlphaNum c && isAscii c && c `elem` "-_.~" then [c] else '%' : (showHex $ ord c) ""


问:
Match up to 10 in an array

Challenge

Given an array of single digit number, work out if any 2 of them add up to 10 and print them out

Example

Input

(1,2,3,4,5,5,6,7)

This returns ((4,6),(5,5),(3,7))

Input

(1,2,3,4,5)

This returns (). as there is only one 5

Input

(5,5,5,5,5)

This returns ((5,5),(5,5)) as there is odd number of 5s and each 5 can be used only once

Rules

Here are the rules!

Assume input will only be an unsorted array of positive single digit integers

Each number will be pair up only once, which means if there are three 5s it only form 1 pair (5,5). If there are (3,3,7) it will only form 1 pair (3,7)

For the input: You can use any type of parentheses(or lack of) as long as readers can tell that the input is a single array of numbers.

For the output: It must look like an array of pairs. Where the array is the same form as your input.(If you did not use any parenheses in your input, you have to use some kind of symbols so that any readers can tell they are pairs in an array)

Test Cases

```<code>(1,2,3,4,5,5,6,7) =((4,6),(5,5),(3,7))
(1,2,3,4,5) = ()
(5,5,5,5,5) = ((5,5),(5,5))
(1,2,3,3,4,5,6,7)=((3,7),(4,6))
(9,8,7,6,4,4,3,1)=((9,1),(7,3),(6,4))
</code>```

Good luck!

The shorter an answer is, the better!

Edit 1: update the rules and Testcases from comments

Edit 2: update rules to define format of input.

Edit 3: update rules to define format of output. trying to be as accommodating as possible.

Title: Match up to 10 in an array

Body:
C, 142,138, 124

char*p,*q;
main(int a,char**s){
    for(p=s[1];*p;p++)
        if(q=strchr(p+1,106-*p))a=*q=printf("%c(%c,%c)",38+a,*p,*q);
    puts("()"+a/6);
}

Testing:

./a.out "(1,2,3,4,5,5,6,7)"
((3,7),(4,6),(5,5))

./a.out "(1,2,3,4,5)"
()

./a.out "(5,5,5,5,5)"
((5,5),(5,5))

./a.out "(1,2,3,3,4,5,6,7)"
((3,7),(4,6))

./a.out "(9,8,7,6,4,4,3,1)"
((9,1),(7,3),(6,4))

Implementation notes:

initially a=2 (program has two args), set to 6 (printf prints 6 chars) once a match occurs

106 = '0'+'0'+10, i.e. uses the sum of the ascii codes

38+a, is either 44/40, i.e. '(' or ','

By setting string characters to 6 it ensures they wont add to 106 on other passes

"()"+a/6, is either "()" or ")"


答:
Jelly, 20 bytes

```<code>;Zµ⁼Ṣ€
ẋÇFŒ!ṁ€⁸ÇÐfL’
</code>```

For valid ballot triangles, run time and memory usage are at least O(n!), where n is the number of entries of the triangle. Invalid ones are recognized by crashing, thus printing nothing.

Try it online!

Test run

Locally, I was able to verify that a(4) is calculated correctly.

```<code>$ time jelly eun ';Zµ⁼Ṣ€¶ẋÇFŒ!ṁ€⁸ÇÐfL’' '[1],[2,3],[4,5,6],[7,8,9,10]'
11

real    6m9.829s
user    6m7.930s
sys     0m2.579s
</code>```

How it works

```<code>;Zµ⁼Ṣ€         Helper link. Argument: T (triangular array)

 Z             Zip/transpose T.
;              Concatenate the original and the transposed copy.
  µ            Begin a new monadic chain, with the previous result (R) as argument.
    Ṣ€         Sort each array in R.
   ⁼           Test for equality with R.
               This returns 1 if T is a ballot triangle, 0 if not.

ẋÇFŒ!ṁ€⁸ÇÐfL’  Main link. Argument: A (triangular array)

 Ç             Call the helper link with argument A.
ẋ              Repeat A that many times.
               This yields an empty array if A is not a ballot triangle.
  F            Flatten the result.
   Œ!          Generate all permutations of the digits of A.
     ṁ€⁸       Mold each permutation like A, i.e., give it triangular form.
               This crashes if permutation array is empty.
        ÇÐf    Filter; keep permutations for which the helper link returns 1.
           L’  Compute the length and decrement it.
</code>```

Title: Verify a ballot triangle

Body:
A ballot number, which we'll label B, is the number of ways of arranging the numbers from 1 through B(B+1)/2 into a triangle, such that each row and column is in any increasing order. The first four ballot numbers are:

```<code>a(0) = 1
a(1) = 1
a(2) = 1
a(3) = 2
</code>```

a(3) is 2, which means that there are 2 ways of arranging the numbers from 1 to 3(3+1)/2 = 6 in such a triangle:

```<code>1          1
2 3    or  2 4
4 5 6      3 5 6
</code>```

See the OEIS sequence entry for more details.

Your challenge, given a ballot triangle, is to verify its correctness. If it satisfies the conditions of a ballot triangle (rows and columns increasing), you should output how many other ways (excluding the one in the input) there are to arrange the triangle correctly. If the input triangle is incorrectly constructed, you should output nothing.

Trailing newlines are allowed.

Input

A triangle of numbers, which may or may not be a valid ballot triangle. For example:

```<code>1
2 3
4 5 6

1
10 5
9 8 2
7 6 4 3

1
3 2

9
2 11
14 3 5
12 8 1 7
15 13 10 4 6

1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
16 17 18 19 20 21
</code>```

Output

If the input is a valid ballot triangle, the remaining number of ways to arrange the same numbers in a valid ballot triangle. If the input is not a valid ballot triangle, nothing. For example, the inputs above produce these outputs (<nothing> is a placeholder for an actual empty output):

```<code>1                     # the same as a(3)-1

<nothing>

<nothing>

<nothing>

33591                 # the same as a(6)-1
</code>```

Scoring

This is code-golf: as usual, lowest byte-count wins. Tiebreaker is earliest posted.

Body:
Jelly, 20 bytes

;Zµ⁼Ṣ€
ẋÇFŒ!ṁ€⁸ÇÐfL’

For valid ballot triangles, run time and memory usage are at least O(n!), where n is the number of entries of the triangle. Invalid ones are recognized by crashing, thus printing nothing.

Try it online!

Test run

Locally, I was able to verify that a(4) is calculated correctly.

$ time jelly eun ';Zµ⁼Ṣ€¶ẋÇFŒ!ṁ€⁸ÇÐfL’' '[1],[2,3],[4,5,6],[7,8,9,10]'
11

real    6m9.829s
user    6m7.930s
sys     0m2.579s

How it works

;Zµ⁼Ṣ€         Helper link. Argument: T (triangular array)

 Z             Zip/transpose T.
;              Concatenate the original and the transposed copy.
  µ            Begin a new monadic chain, with the previous result (R) as argument.
    Ṣ€         Sort each array in R.
   ⁼           Test for equality with R.
               This returns 1 if T is a ballot triangle, 0 if not.

ẋÇFŒ!ṁ€⁸ÇÐfL’  Main link. Argument: A (triangular array)

 Ç             Call the helper link with argument A.
ẋ              Repeat A that many times.
               This yields an empty array if A is not a ballot triangle.
  F            Flatten the result.
   Œ!          Generate all permutations of the digits of A.
     ṁ€⁸       Mold each permutation like A, i.e., give it triangular form.
               This crashes if permutation array is empty.
        ÇÐf    Filter; keep permutations for which the helper link returns 1.
           L’  Compute the length and decrement it.


问:
Blunt the Images

Introduction

Sharp edges are, frankly, just plain dangerous so, given a PNG as input, blur the image using the method described below and blunt those damned sharp edges.

Method

To get the RGB value of each pixel, use the following three equations:

$$R = \sqrt{\frac{1.5\times\sum^n_{a=1}R^2_a}{n}}$$
$$G = \sqrt{\frac{1.5\times\sum^n_{a=1}G^2_a}{n}}$$
$$B = \sqrt{\frac{1.5\times\sum^n_{a=1}B^2_a}{n}}$$

Where \$\sum^n_{a=1}R^2_a\$ is the sum of the red values of each of the adjacent pixels squared. The value of \$n\$ is the number of adjacent pixels (e.g., a corner pixel will have an \$n\$ value of 3, whilst a pixel around the center of the image will have an \$n\$ value of 8).

An adjacent pixel is a pixel which is 1 pixel away from the original pixel in all directions (left, right, up, down and on all of the diagonals).

For example, in the following 3 x 1 image:

The blurred RGB value of the middle pixel will be:

$$R = \sqrt{\frac{1.5*(0^2+0^2)}{2}} = 0$$
$$G = \sqrt{\frac{1.5*(0^2+255^2)}{2}} = 220.836 = 221$$
$$B = \sqrt{\frac{1.5*(255^2+0^2)}{2}} = 220.836 = 221$$

where any decimal outputs are rounded to the nearest unit. You should not simply floor the result.

Therefore, the middle pixel will be the colour (0, 221, 221), or:

Resulting in the image:

You should repeat this process for every pixel in the image. (Note that you do this with the original pixels and not the modified pixels. Basically, you shouldn't overwrite the original image, and should keep it completely separate from the new, blurred image).

If you calculate any values to be greater than 255, assume that its value is 255 (I.e., a value of 374 would be set to 255).

The resulting output should be a separate PNG image (you may name this whatever you wish).

Examples

Super Mario

Original:

Blurred:

Checkerboard

Original:

Blurred:

Crisps

Original

Blurred

Not so crisp anymore

American Gothic

Original:

Blurred:

To see the blur on larger images, it's best to run the program again on the blurred image:

Challenge

The shortest code to blur a given PNG image wins.

You can use image processing libraries (such as PIL) but you must not use built-in blurring functions (Mathematica, I'm looking at you).

Note

As @orlp says below:

For the record, (to my knowledge) this is not a standard blurring method. This challenge is not an educational resource.

答:
Python, <s>354</s> 313 bytes

Not the best, but hey...

Using Space for 1st level indentation, Tab for 2nd level, then Tab+Space and Tab+Tab

import Image as I
A=I.open(raw_input())
w,h=A.size
B=I.new('RGB',(w,h))
s=[-1,1,0]
r=range
for x in r(w):
 for y in r(h):
    P=[]
    for d in s:
     for e in s:
        try:P+=[A.load()[x+e,y+d]]
        except:0
    P.pop()
    B.load()[x,y]=tuple(min(int(.5+(1.5*sum([v*v for v in t])/len(P))**.5),255)for t in zip(*P))
B.save("b.jpg")
```

Edit1: replacing math.sqrt() with ()**.5 thanks to beta decay

Edit2: using min for clamping (saving a lot!) and 0 for pass thanks to Loovjo

Edit3: +=[] for .append() saving 5 bytes

Edit4: using the variable s for the stencil

Title: Blunt the Images

Body:
Python, <s>354</s> 313 bytes

Not the best, but hey...

Using Space for 1st level indentation, Tab for 2nd level, then Tab+Space and Tab+Tab

import Image as I
A=I.open(raw_input())
w,h=A.size
B=I.new('RGB',(w,h))
s=[-1,1,0]
r=range
for x in r(w):
 for y in r(h):
    P=[]
    for d in s:
     for e in s:
        try:P+=[A.load()[x+e,y+d]]
        except:0
    P.pop()
    B.load()[x,y]=tuple(min(int(.5+(1.5*sum([v*v for v in t])/len(P))**.5),255)for t in zip(*P))
B.save("b.jpg")

Edit1: replacing math.sqrt() with ()**.5 thanks to beta decay

Edit2: using min for clamping (saving a lot!) and 0 for pass thanks to Loovjo

Edit3: +=[] for .append() saving 5 bytes

Edit4: using the variable s for the stencil


问:
Write a Sine-Deriving Machine

The Challenge

Your challenge is to write a program that evaluates the following function:

f(x, t) = d^x / dt^x (sin t)

That is, the x-th derivative of sin t. In case you aren't familiar with calculus, here is a table of derivatives for the sine function:

...

f(-1, t) = -cos t

f(0, t) = sin t

f(1, t) = cos t

f(2, t)= -sin  t

...

The sequence repeats these 4 functions.

The Inputs

Your program should take in an integer to be used as the x value in the function, and a float to be used at the t value in the function.

Your program may use radians or degrees for the sine function.

The Output

Your program should output the value of f(x, t) given the integer x and float t.

Scoring

This is code-golf, so the shortest answer (in bytes) wins.

答:
Matlab, 19 bytes

```<code>@(x,t)sin(t+x*pi/2)
</code>```

Title: Write a Sine-Deriving Machine

Body:
Matlab, 19 bytes

@(x,t)sin(t+x*pi/2)


问:
One out of Infinity: Interpolating polynomials
For this challenge, when given a list of (x,y) points your submission needs to output a polynomial function that goes through all of them.

For example, if your points were [(0,0), (2,5)], you could return y = 2.5*x or y = x + 1/4x^2.

All points passed in will consist only of integers

Two points will never have the same y value

Your function be of the form y = a*x^n + ... b*x^m.   Reducing of terms is allowed.

Constants (the exponent and coefficient) can either be in decimal or fractional form.  Decimals should be accurate to at least 3 decimal places

You should be able to handle an arbitrary number of points

Output must be a string starting with "y=". Whitespace anywhere in the string is fine.

Test cases

Note, the given output is not the only valid output, just one of the possibilities.

```<code>(1,4)                                                    -> y=x+3
(0,0), (1,8)                                             -> y=8x
(0,6), (-1,90)                                           -> y=-84x+6
(6,4), (70,4), (-1,-6)                                   -> y=−10/497x^2+760/497x−316/71
(4,5), (5,6), (6,7)                                      -> y=x+1
(20,1), (-20,1), (0,5), (10, 4), (11,12), (17,4), (2,4)  -> y=488137/10424165400x^6−643187/473825700x^5−87561839/10424165400x^4+550999039/1042416540x^3−21590713027/5212082700x^2+300110420/52120827x+5
</code>```

This is a code-golf, so make your answers as short as possible in your favorite language!

答:
Python2 + sympy, 61 58 bytes

from sympy import*;print interpolate(input("y="),var("x"))
```


问:
Can you outgolf me? (Cops section)

Cops section

The robbers section can be found here.

Thanks to FryAmTheEggman, Peter Taylor, Nathan Merrill, xnor, Dennis, Laikoni and Mego for their contributions.

Challenge

Your task is to write 2 different programs (full programs/functions/etc.) in the same language and the same version (e.g. Python 3.5 ≠ Python 3.4, so that is not allowed), and when given n (using STDIN/function arguments/etc.), compute a(n) where a is an OEIS sequence of your choice. One of those programs is shorter than the other. You only need to submit the longer program of the two. The other one needs to be saved in case of not being cracked after 7 days. Your submission is cracked when your program has been outgolfed (whether it is by 1 byte or more).

For example, if the task you chose was to perform 2 × n, this could be a valid submission (in Python 2):

Python 2, 16 bytes, score = 15 / 16 = 0.9375

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

Computes A005843, (offset = 0).

If your submission has been cracked, then you need to state that in your header like so:

Python 2, 16 bytes, score = 15 / 16 = 0.9375, [cracked] + link

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

Computes A005843, (offset = 0).

Offset

This can be found on every OEIS page. For example, for A005843, the offset is 0,2. We only need to use the first one, which is 0. This means that the function is defined for all numbers ≥ 0.

In other words, the function OEIS(n) starts with n = 0. Your program needs to work for all cases given by OEIS.

More information can be found here.

Scoring

The score you get for your submission is equal to the following formula:

Score = Length (in bytes) of secret code ÷ Length (in bytes) of public code

The example above has the score 15 ÷ 16 = 0.9375.

The submission with the lowest score wins. Only submissions that have posted their solution will be eligible for winning.

Rules

The task you need to do is an OEIS sequence of your choice.

Given n, output OEIS(n). Deviation is not allowed, so you need to produce the exact same sequence (when given n, you need to output OEIS(n)).

Submissions that are not cracked within a period of 7 days are considered safe after the solution has been posted (submissions older than 7 days that do not have their solution posted are still vulnerable in being cracked).

In your submission, you need to post the following things: language name, byte count, full code, so no pastebin links etc. (to prevent answers like Unary), OEIS sequence, score with lengths of both programs and additionally, the encoding that is used.

Note: the same sequence cannot be posted twice in the same language. (For example, if the sequence A005843 has been done in Pyth, you cannot use Pyth again for that same sequence.)

Input and output are both in decimal (base 10)

Leaderboard

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

Uncracked submissions

 Language	 Score	 User

Sort by: score creation

Safe submissions

 Language	 Score	 User

```

Note

This challenge is finished. The final winner is feersum with his Seed answer. Congratulations! :).

You can still submit new cops, but be aware that they are no longer competing.

答:
Jelly, 22 bytes, score 0.2727 (6 / 22) [cracked]

```<code>‘ðḤ;+;c2\×P:+’×$¥µÐ€‘S
</code>```

This calculates sequence A116881. Try it online!

Title: Can you outgolf me? (Cops section)

Body:
Jelly, 22 bytes, score 0.2727 (6 / 22) [cracked]

‘ðḤ;+;c2\×P:+’×$¥µÐ€‘S

This calculates sequence A116881. Try it online!


答:
Matlab (with Symbolic Toolbox), 52 bytes

Using builtins for calculating an interpolation polynomial, and then converting it to a symbolc expression for pretty printing and back to a string for the actual output. This function takes two lists of coordinates, e.g. [6,70,-1] and [4,4,-6] for the fourth test case.

```<code> @(x,y)['y=',char(poly2sym(polyfit(x,y,numel(x)-1)))]
</code>```

Title: One out of Infinity: Interpolating polynomials

Body:
For this challenge, when given a list of (x,y) points your submission needs to output a polynomial function that goes through all of them.

For example, if your points were [(0,0), (2,5)], you could return y = 2.5*x or y = x + 1/4x^2.

All points passed in will consist only of integers

Two points will never have the same y value

Your function be of the form y = a*x^n + ... b*x^m.   Reducing of terms is allowed.

Constants (the exponent and coefficient) can either be in decimal or fractional form.  Decimals should be accurate to at least 3 decimal places

You should be able to handle an arbitrary number of points

Output must be a string starting with "y=". Whitespace anywhere in the string is fine.

Test cases

Note, the given output is not the only valid output, just one of the possibilities.

```<code>(1,4)                                                    -> y=x+3
(0,0), (1,8)                                             -> y=8x
(0,6), (-1,90)                                           -> y=-84x+6
(6,4), (70,4), (-1,-6)                                   -> y=−10/497x^2+760/497x−316/71
(4,5), (5,6), (6,7)                                      -> y=x+1
(20,1), (-20,1), (0,5), (10, 4), (11,12), (17,4), (2,4)  -> y=488137/10424165400x^6−643187/473825700x^5−87561839/10424165400x^4+550999039/1042416540x^3−21590713027/5212082700x^2+300110420/52120827x+5
</code>```

This is a code-golf, so make your answers as short as possible in your favorite language!

Body:
Matlab (with Symbolic Toolbox), 52 bytes

Using builtins for calculating an interpolation polynomial, and then converting it to a symbolc expression for pretty printing and back to a string for the actual output. This function takes two lists of coordinates, e.g. [6,70,-1] and [4,4,-6] for the fourth test case.

 @(x,y)['y=',char(poly2sym(polyfit(x,y,numel(x)-1)))]


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

答:
Actually, <s>28</s> 11 bytes, Mego

```<code>19,`;τ(+`nX
</code>```

Try it online!

How it works

This uses the recursive definition from A048696: a(0) = 1, a(1) = 9, a(n) = 2a(n-1) + a(n-2).

```<code>19           Push 1 and 9 on the stack.
  ,          Read n from STDIN and push it on the stack.
   `    `n   Do the following n times:
    ;          Push a copy of the topmost integer.
     τ         Multiply it by 2.
      (        Rotate the bottom-most integer on top of the stack.
       +       Add the two topmost integers.
             Each iteration turns the stack [a(k-2) a(k-1)] into [a(k-1) a(k)].
             After n iterations, we are left with [a(n) a(n+1)].
          X  Discard a(n+1) from the stack.
</code>```

Title: Can you outgolf me? (Robbers section)

Body:
Actually, <s>28</s> 11 bytes, Mego

19,`;τ(+`nX

Try it online!

How it works

This uses the recursive definition from A048696: a(0) = 1, a(1) = 9, a(n) = 2a(n-1) + a(n-2).

19           Push 1 and 9 on the stack.
  ,          Read n from STDIN and push it on the stack.
   `    `n   Do the following n times:
    ;          Push a copy of the topmost integer.
     τ         Multiply it by 2.
      (        Rotate the bottom-most integer on top of the stack.
       +       Add the two topmost integers.
             Each iteration turns the stack [a(k-2) a(k-1)] into [a(k-1) a(k)].
             After n iterations, we are left with [a(n) a(n+1)].
          X  Discard a(n+1) from the stack.


答:
MATL, 38 bytes

```<code>ynq3$ZQ'y=' '%+fx^%i'btn:qP&vYDh1J3-h)
</code>```

Inputs are an array with the x values and an array with the y values.

Try it online!

```<code>y          % Inplicitly take the two inputs, and push another copy of the first
nq         % Get its length minus 1. This is the required polynomial degree.
3$ZQ       % Coefficients of polynomial fitted to those data (`polyfit`)
'y='       % Push this string
'%+fx^%i'  % Push format string for `sprintf`
b          % Bubble up the polynomial coefficients to the top of the stack
tn:qP      % Duplicate and produce [n n-1  ... 0] where n is the polynomial degree.
           % These are the exponents
&v         % Concatenate vertically. This gives a 2D array with the coefficients in
           % the first row and the exponents in the second
YD         % Apply `sprintf` to this array with previous format string. The array
           % is read in column-major order: down, then across
h          % Concatenate 'y=' and formatted string representing the polynomial
1J3-h)     % The string ends in '...x^0'. Remove last three chars to delete this.
           % Implicitly display
</code>```

Body:
MATL, 38 bytes

ynq3$ZQ'y=' '%+fx^%i'btn:qP&vYDh1J3-h)

Inputs are an array with the x values and an array with the y values.

Try it online!

y          % Inplicitly take the two inputs, and push another copy of the first
nq         % Get its length minus 1. This is the required polynomial degree.
3$ZQ       % Coefficients of polynomial fitted to those data (`polyfit`)
'y='       % Push this string
'%+fx^%i'  % Push format string for `sprintf`
b          % Bubble up the polynomial coefficients to the top of the stack
tn:qP      % Duplicate and produce [n n-1  ... 0] where n is the polynomial degree.
           % These are the exponents
&v         % Concatenate vertically. This gives a 2D array with the coefficients in
           % the first row and the exponents in the second
YD         % Apply `sprintf` to this array with previous format string. The array
           % is read in column-major order: down, then across
h          % Concatenate 'y=' and formatted string representing the polynomial
1J3-h)     % The string ends in '...x^0'. Remove last three chars to delete this.
           % Implicitly display


Title: Match up to 10 in an array

Body:
Challenge

Given an array of single digit number, work out if any 2 of them add up to 10 and print them out

Example

Input

(1,2,3,4,5,5,6,7)

This returns ((4,6),(5,5),(3,7))

Input

(1,2,3,4,5)

This returns (). as there is only one 5

Input

(5,5,5,5,5)

This returns ((5,5),(5,5)) as there is odd number of 5s and each 5 can be used only once

Rules

Here are the rules!

Assume input will only be an unsorted array of positive single digit integers

Each number will be pair up only once, which means if there are three 5s it only form 1 pair (5,5). If there are (3,3,7) it will only form 1 pair (3,7)

For the input: You can use any type of parentheses(or lack of) as long as readers can tell that the input is a single array of numbers.

For the output: It must look like an array of pairs. Where the array is the same form as your input.(If you did not use any parenheses in your input, you have to use some kind of symbols so that any readers can tell they are pairs in an array)

Test Cases

```<code>(1,2,3,4,5,5,6,7) =((4,6),(5,5),(3,7))
(1,2,3,4,5) = ()
(5,5,5,5,5) = ((5,5),(5,5))
(1,2,3,3,4,5,6,7)=((3,7),(4,6))
(9,8,7,6,4,4,3,1)=((9,1),(7,3),(6,4))
</code>```

Good luck!

The shorter an answer is, the better!

Edit 1: update the rules and Testcases from comments

Edit 2: update rules to define format of input.

Edit 3: update rules to define format of output. trying to be as accommodating as possible.

Body:
SED, 112 chars

Probably somewhat simpler than the other solutions

s/.*/@&;12345678987654321/
:
s/\(@.*\)\(.\)\(.*\)\(.\)\(.*;.*\2.\{7\}\4\)/(\2,\4),\1\3\5/
t
s/^\(.*\),@.*/(\1)/


问:
"Hello, World!"
So... uh... this is a bit embarrassing. But we don't have a plain "Hello, World!" challenge yet (despite having 35 variants tagged with hello-world, and counting). While this is not the most interesting code golf in the common languages, finding the shortest solution in certain esolangs can be a serious challenge. For instance, to my knowledge it is not known whether the shortest possible Brainfuck solution has been found yet.

Furthermore, while all of <s>Wikipedia</s> (the Wikipedia entry has been deleted but there is a copy at archive.org
), esolangs and Rosetta Code have lists of "Hello, World!" programs, none of these are interested in having the shortest for each language (there is also this GitHub repository). If we want to be a significant site in the code golf community, I think we should try and create the ultimate catalogue of shortest "Hello, World!" programs (similar to how our basic quine challenge contains some of the shortest known quines in various languages). So let's do this!

The Rules

Each submission must be a full program.

The program must take no input, and print Hello, World! to STDOUT (this exact byte stream, including capitalization and punctuation) plus an optional trailing newline, and nothing else.

The program must not write anything to STDERR.

If anyone wants to abuse this by creating a language where the empty program prints Hello, World!, then congrats, they just paved the way for a very boring answer.

Note that there must be an interpreter so the submission can be tested. It is allowed (and even encouraged) to write this interpreter yourself for a previously unimplemented language.

Submissions are scored in bytes, in an appropriate (pre-existing) encoding, usually (but not necessarily) UTF-8. Some languages, like Folders, are a bit tricky to score - if in doubt, please ask on Meta.

This is not about finding the language with the shortest "Hello, World!" program. This is about finding the shortest "Hello, World!" program in every language. Therefore, I will not mark any answer as "accepted".

If your language of choice is a trivial variant of another (potentially more popular) language which already has an answer (think BASIC or SQL dialects, Unix shells or trivial Brainfuck-derivatives like Alphuck), consider adding a note to the existing answer that the same or a very similar solution is also the shortest in the other language.

As a side note, please don't downvote boring (but valid) answers in languages where there is not much to golf - these are still useful to this question as it tries to compile a catalogue as complete as possible. However, do primarily upvote answers in languages where the authors actually had to put effort into golfing the code.

For inspiration, check the Hello World Collection.

The Catalogue

The Stack Snippet at the bottom of this post generates the catalogue from the answers a) as a list of shortest solution per language and b) as an overall leaderboard.

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

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

/* Configuration */

var QUESTION_ID = 55422; // 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 = 8478; // 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,<]*(?:<(?:[^\n>]*>[^\n<]*<\/[^\n>]*>)[^\n,<]*)*),.*?(\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,
      });
    else console.log(body);
  });

  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;
    lang = jQuery(''+lang+'').text();

    languages[lang] = languages[lang] || {lang: a.language, lang_raw: lang, user: a.user, size: a.size, link: a.link};
  });

  var langs = [];
  for (var lang in languages)
    if (languages.hasOwnProperty(lang))
      langs.push(languages[lang]);

  langs.sort(function (a, b) {
    if (a.lang_raw.toLowerCase() > b.lang_raw.toLowerCase()) return 1;
    if (a.lang_raw.toLowerCase() < b.lang_raw.toLowerCase()) 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;
  display: block !important;
}

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

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

table thead {
  font-weight: bold;
}

table td {
  padding: 5px;
}</code>```

<link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Sites/codegolf/all.css?v=ffb5d0584c5f">

Shortest Solution by Language

Language	User	Score

Leaderboard

	Author	Language	Size

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

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

```

答:
Golfuck, 39 bytes

```<code>jrseeqzjzzzsvDsj*aaa*r"s*hB(FsxahB(z*sh
</code>```

Credit to primo, this is his answer, but in Golfuck.

Title: "Hello, World!"

Body:
Golfuck, 39 bytes

jrseeqzjzzzsvDsj*aaa*r"s*hB(FsxahB(z*sh

Credit to primo, this is his answer, but in Golfuck.


答:
SQF, <s>199</s> 176

Using the function-as-a-file format:

```<code>i="";a="0123456789ABCDEF!'()*-.GHIJKLMNOPQRSTUVWXYZ_";{i=i+if((toUpper _x)in a)then{_x}else{x=(toArray[_x])select 0;"%"+(a select floor(x/16))+(a select(x%16))}}forEach _this;i
</code>```

Call as "STRING" call NAME_OF_COMPILED_FUNCTION

Title: Percent-Encode a String

Body:
SQF, <s>199</s> 176

Using the function-as-a-file format:

i="";a="0123456789ABCDEF!'()*-.GHIJKLMNOPQRSTUVWXYZ_";{i=i+if((toUpper _x)in a)then{_x}else{x=(toArray[_x])select 0;"%"+(a select floor(x/16))+(a select(x%16))}}forEach _this;i

Call as "STRING" call NAME_OF_COMPILED_FUNCTION


问:
Given an integer, compute its Levenshtein code
Disclaimer: Levenshtein coding is completely unrelated to the Levenshtein edit distance metric.

<Insert long story about why Levenshtein codes need to be calculated here.>

The code

Levenshtein coding is a system of assigning binary codes to nonnegative integers that retains some weird property in probability which isn't relevant for this challenge. We will denote this code as L(n). Wikipedia describes this as a five-step process:

Initialize the step count variable C to 1.

Write the binary representation of the number without the leading 1 to the beginning of the code.

Let M be the number of bits written in step 2.

If M is not 0, increment C, repeat from step 2 with M as the new number.

Write C 1 bits and a 0 to the beginning of the code.

However, the code can also be described recursively:

If the number is 0, then its code is 0.

Write the binary representation of the number without the leading 1 to the beginning of the code.

Let M be the number of bits written in step 2.

Write L(M) to the beginning of the code.

Write a 1 bit to the beginning of the code.

For those who prefer examples, here is the recursive process for L(87654321), with  denoting concatenation:

The challenge

Write a program or function that, given a number n, outputs the bitstring L(n) in any reasonable format (this includes returning a number with said bits). Standard loopholes are, as always, disallowed.

Examples

Input: 5

Output: 1110001

Input: 30

Output: 111100001110

Input: 87654321

Output: 111110000101001001110010111111110110001

Input: 0

Output: 0

答:
Haskell, 70 bytes

```<code>b 0=[]
b n=b(div n 2)++[mod n 2]
f 0=[0]
f n|1:t<-b n=1:f(length t)++t
</code>```

Defines a function f : Int -> [Int]. For example, f 5 == [1,1,1,0,0,0,1].

Body:
Haskell, 70 bytes

b 0=[]
b n=b(div n 2)++[mod n 2]
f 0=[0]
f n|1:t<-b n=1:f(length t)++t

Defines a function f : Int -> [Int]. For example, f 5 == [1,1,1,0,0,0,1].


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

```<code>Ḣ;LÑ$;
BÇṀ¡
</code>```

Try it online! or verify all test cases.

How it works

The submission consists of a pair of mutually recursive links.

```<code>BÇṀ¡    Main link. Argument: n

B       Convert n to binary.
   ¡    Execute...
 Ç        the helper link...
  Ṁ       m times, where m is the maximum of n's binary digits.

Ḣ;LÑ$;  Helper link. Argument: A (array of binary digits)

Ḣ       Head; remove and return the first element of A.
    $   Combine the two links to the left into a monadic chain.
  L       Yield the length (l) of A without its first element.
   Ñ      Call the main link with argument l.
 ;      Concatenate the results to both sides.
     ;  Append the tail of A.
</code>```

Title: Given an integer, compute its Levenshtein code

Body:
Disclaimer: Levenshtein coding is completely unrelated to the Levenshtein edit distance metric.

<Insert long story about why Levenshtein codes need to be calculated here.>

The code

Levenshtein coding is a system of assigning binary codes to nonnegative integers that retains some weird property in probability which isn't relevant for this challenge. We will denote this code as L(n). Wikipedia describes this as a five-step process:

Initialize the step count variable C to 1.

Write the binary representation of the number without the leading 1 to the beginning of the code.

Let M be the number of bits written in step 2.

If M is not 0, increment C, repeat from step 2 with M as the new number.

Write C 1 bits and a 0 to the beginning of the code.

However, the code can also be described recursively:

If the number is 0, then its code is 0.

Write the binary representation of the number without the leading 1 to the beginning of the code.

Let M be the number of bits written in step 2.

Write L(M) to the beginning of the code.

Write a 1 bit to the beginning of the code.

For those who prefer examples, here is the recursive process for L(87654321), with  denoting concatenation:

The challenge

Write a program or function that, given a number n, outputs the bitstring L(n) in any reasonable format (this includes returning a number with said bits). Standard loopholes are, as always, disallowed.

Examples

Input: 5

Output: 1110001

Input: 30

Output: 111100001110

Input: 87654321

Output: 111110000101001001110010111111110110001

Input: 0

Output: 0

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

Ḣ;LÑ$;
BÇṀ¡

Try it online! or verify all test cases.

How it works

The submission consists of a pair of mutually recursive links.

BÇṀ¡    Main link. Argument: n

B       Convert n to binary.
   ¡    Execute...
 Ç        the helper link...
  Ṁ       m times, where m is the maximum of n's binary digits.

Ḣ;LÑ$;  Helper link. Argument: A (array of binary digits)

Ḣ       Head; remove and return the first element of A.
    $   Combine the two links to the left into a monadic chain.
  L       Yield the length (l) of A without its first element.
   Ñ      Call the main link with argument l.
 ;      Concatenate the results to both sides.
     ;  Append the tail of A.


答:
Python, 49 bytes

f=lambda n:n and'1%s'%f(len(bin(n))-3)+bin(n)[3:]
```

Test it on Ideone.

Body:
Python, 49 bytes

f=lambda n:n and'1%s'%f(len(bin(n))-3)+bin(n)[3:]

Test it on Ideone.


答:
JavaScript (ES6), <s>54</s> 52 bytes

f=n=>(s=n.toString(2)).replace(1,_=>1+f(s.length-1))```
<pre class="snippet-code-html lang-html prettyprint-override"><code><input type=number oninput=o.textContent=f(+this.value)><pre id=o></code>```

Edit: Saved 2 bytes thanks to @Arnauld.

Body:
JavaScript (ES6), <s>54</s> 52 bytes

f=n=>(s=n.toString(2)).replace(1,_=>1+f(s.length-1))

<input type=number oninput=o.textContent=f(+this.value)><pre id=o>

Edit: Saved 2 bytes thanks to @Arnauld.


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

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

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

. →  .

 . →   .

  . →    .

   . →     .

    . →      .

     . →       .

      . →        .

       . →         .

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

/ → /\

\ → \/

/\ → /\/

\/ → \/\

/\/ → /\/\

\/\ → \/\/

/\/\ → /\/\/

\/\/ → \/\/\

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

The shortest code in bytes wins.

答:
Game Maker Language, 107 bytes

```<code>s=argument0;if string_pos(" ",s)return " "+s;if string_pos(s,string_length(s))="/"s+="\"else s+="/"return s
</code>```

Body:
Game Maker Language, 107 bytes

s=argument0;if string_pos(" ",s)return " "+s;if string_pos(s,string_length(s))="/"s+="\"else s+="/"return s


问:
Alphabet Spiral
You are to write a program or function that outputs this exact text:

```<code>OPQRSTU
NQPONMV
MREDCLW
LSFABKX
KTGHIJY
JUVWXYZA
IHGFEDCB
</code>```

May also be lowercase and trailing spaces and newlines are allowed.

Standard loopholes are disallowed

This is code-golf, so smallest byte count wins.

答:
Ruby, 63 bytes

In this case, nothing I found beats the boring answer...

```<code>puts"OPQRSTU
NQPONMV
MREDCLW
LSFABKX
KTGHIJY
JUVWXYZA
IHGFEDCB"
</code>```

My best solution that didn't print the literal string only, but still has to directly hardcode some of it, is 110 bytes:

```<code>w=[*?B..?Q].reverse*''
puts [*?O..?U]*'',[?N,w[0,5],?V]*'',"MREDCLW
LSFABKX
KTGHIJY",[?J,*?U..?Z,?A]*'',w[8,8]
</code>```

Title: Alphabet Spiral

Body:
Ruby, 63 bytes

In this case, nothing I found beats the boring answer...

puts"OPQRSTU
NQPONMV
MREDCLW
LSFABKX
KTGHIJY
JUVWXYZA
IHGFEDCB"

My best solution that didn't print the literal string only, but still has to directly hardcode some of it, is 110 bytes:

w=[*?B..?Q].reverse*''
puts [*?O..?U]*'',[?N,w[0,5],?V]*'',"MREDCLW
LSFABKX
KTGHIJY",[?J,*?U..?Z,?A]*'',w[8,8]


答:
SQF, 110

Recursive function:

```<code>f={params[["i",0],["l",[]]];if(i<1)exitWith{[0]};while{i>1}do{l=[i%2]+l;i=floor(i/2)};[1]+([count l]call f)+l}
</code>```

Call as: [NUMBER] call f

 Note this doesn't actually work for 87654321 or other large numbers due to a bug in the ArmA engine. Although it will probably be fixed soon, and should work according to spec.

(This Ticket Here)

Body:
SQF, 110

Recursive function:

f={params[["i",0],["l",[]]];if(i<1)exitWith{[0]};while{i>1}do{l=[i%2]+l;i=floor(i/2)};[1]+([count l]call f)+l}

Call as: [NUMBER] call f

 Note this doesn't actually work for 87654321 or other large numbers due to a bug in the ArmA engine. Although it will probably be fixed soon, and should work according to spec.

(This Ticket Here)


答:
Javascript - 131 129 125 chars

```<code>for(i=eval(prompt(r=[])),k=j=i.length;j--;)for(m=k;m--;)if(m!=j&&i[j]+i[m]==10)r.push([i[j],i[m]]),i[j]=i[m]=0;console.log(r)
</code>```

I assume, the order of and in the nested result arrays is not compulsory :)

Evaluated test cases:

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

Edit: As the problem description says 'Array', we're talking about the language specific notation of an array, right?

Title: Match up to 10 in an array

Body:
Javascript - 131 129 125 chars

for(i=eval(prompt(r=[])),k=j=i.length;j--;)for(m=k;m--;)if(m!=j&&i[j]+i[m]==10)r.push([i[j],i[m]]),i[j]=i[m]=0;console.log(r)

I assume, the order of and in the nested result arrays is not compulsory :)

Evaluated test cases:

[1,2,3,4,5,5,6,7] returns [[7,3],[6,4],[5,5]]
[1,2,3,4,5]       returns []
[5,5,5,5,5]       returns [[5,5],[5,5]]
[1,2,3,3,4,5,6,7] returns [[7,3],[6,4]]
[9,8,7,6,4,4,3,1] returns [[1,9],[3,7],[4,6]]

Edit: As the problem description says 'Array', we're talking about the language specific notation of an array, right?


答:
Pyth, 12 bytes

```<code>L&bX1.Bbyslb
</code>```

Demonstration

(The y at the end is to run the resulting function on the input)

Explanation:

```<code>L&bX1.Bbyslb
L               def y(b):
 &b             If b is 0, return 0. This is returned as an int, but will be cast
                to a string later.
          lb    Take the log of b
         s      Floor
        y       Call y recursively
   X1           Insert at position 1 into
     .Bb        Convert b to binary.
</code>```

Body:
Pyth, 12 bytes

L&bX1.Bbyslb

Demonstration

(The y at the end is to run the resulting function on the input)

Explanation:

L&bX1.Bbyslb
L               def y(b):
 &b             If b is 0, return 0. This is returned as an int, but will be cast
                to a string later.
          lb    Take the log of b
         s      Floor
        y       Call y recursively
   X1           Insert at position 1 into
     .Bb        Convert b to binary.


答:
Mathematica, 61 bytes

```<code>f@0={0};f@n_:=Join[{1},f@Length@#,#]&@Rest@IntegerDigits[n,2]
</code>```

Body:
Mathematica, 61 bytes

f@0={0};f@n_:=Join[{1},f@Length@#,#]&@Rest@IntegerDigits[n,2]


答:
SQF, 91

Using the function-as-a-file format:

```<code>s=_this;switch(s select[(count s)-1])do{case".":{" "+s};case"\":{s+"/"};case"/":{s+"\"};}
</code>```

Call as "STRING" call NAME_OF_COMPILED_FUNCTION

Title: Wave-Particle Duality Laterally Programmatically

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

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

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

. →  .

 . →   .

  . →    .

   . →     .

    . →      .

     . →       .

      . →        .

       . →         .

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

/ → /\

\ → \/

/\ → /\/

\/ → \/\

/\/ → /\/\

\/\ → \/\/

/\/\ → /\/\/

\/\/ → \/\/\

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

The shortest code in bytes wins.

Body:
SQF, 91

Using the function-as-a-file format:

s=_this;switch(s select[(count s)-1])do{case".":{" "+s};case"\":{s+"/"};case"/":{s+"\"};}

Call as "STRING" call NAME_OF_COMPILED_FUNCTION


问:
Pretty Smooth Moves
In arithmetic, an n-smooth number, where n is a given prime number, is mathematically defined as a positive integer that has no prime factors greater than n. For example, 42 is 7-smooth because all its prime factors are less than or equal to 7, but 44 is not 7-smooth because it also has 11 as a prime factor.

Define a pretty smooth number as a number with no prime factors greater than its own square root. Thus, the list of pretty smooth numbers can be formulated as follows:

(EDITED!) 1 is a pretty smooth number, due to its complete lack of any prime factors. (Note that in the original version of this question, 1 was erroneously excluded from the list, so if you exclude it from your outputs you won't be marked wrong.)

Between 4 (= 22) and 8, the pretty smooth numbers are 2-smooth, meaning they have 2 as their only prime factor.

Between 9 (= 32) and 24, the pretty smooth numbers are 3-smooth, and can have 2s and 3s in their prime factorizations.

Between 25 (= 52) and 48, the pretty smooth numbers are 5-smooth, and can have 2s, 3s, and 5s in their prime factorizations.

And so on, upgrading the criteria every time the square of the next prime number is reached.

The list of pretty smooth numbers is fixed, and begins as follows: 1, 4, 8, 9, 12, 16, 18, 24, 25, ...

Your challenge is to write code that will output all pretty smooth numbers up to and including 10,000 (= 1002). There must be at least one separator (it doesn't matter what kind -- space, comma, newline, anything) between each number in the list and the next, but it is completely irrelevant what character is used.

As per usual, lowest byte count wins -- obviously, simply outputting the list isn't going to be too beneficial to you here. Good luck!

答:
Jelly, 12 bytes

```<code>Æf>½S
³²ḊÇÐḟ
</code>```

Try it online!

How it works

```<code>³²ḊÇÐḟ  Main link. No arguments.

³       Yield 100.
 ²      Square it to yield 10,000.
  Ḋ     Dequeue; yield [2, ..., 10,000].
   ÇÐḟ  Filter-false; keep elements for which the helper link returns 0.

Æf>½S   Helper link. Argument: n

Æf      Compute the prime factorization of n.
  >½    Compare the prime factors with the square root of n.
    S   Sum; add the resulting Booleans.
</code>```

Title: Pretty Smooth Moves

Body:
Jelly, 12 bytes

Æf>½S
³²ḊÇÐḟ

Try it online!

How it works

³²ḊÇÐḟ  Main link. No arguments.

³       Yield 100.
 ²      Square it to yield 10,000.
  Ḋ     Dequeue; yield [2, ..., 10,000].
   ÇÐḟ  Filter-false; keep elements for which the helper link returns 0.

Æf>½S   Helper link. Argument: n

Æf      Compute the prime factorization of n.
  >½    Compare the prime factors with the square root of n.
    S   Sum; add the resulting Booleans.


答:
Brachylog, <s>21</s> 19 bytes

1 byte thanks to Fatalize, for inspiration of another 1 byte.

```<code>100^:4reP$ph^<=P@w\
</code>```

Try it online!

Takes about 6 seconds here.

```<code>100^:4reP$ph^<=P@w\
100                      100
   ^                     squared
    :4                   [10000,4]
      r                  [4,10000]
       eP                P is an integer in that interval (choice point),
        P$ph^<=P         P, prime factorized (from biggest to smallest),
                         take the first element, squared, is less than
                         or equal to P
               P@w       Write P with a newline,
                  \      Backtrack to the last choice point and make
                         a different choice until there is no more
                         choice and the program halts.
</code>```

Previous 21-byte solution

```<code>100^:4reP'($pe^>P)@w\
</code>```

Try it online!

Takes about 6 seconds here.

```<code>100^:4reP'($pe^>P)@w\
100                      100
   ^                     squared
    :4                   [10000,4]
      r                  [4,10000]
       eP                P is an integer in that interval (choice point),
        P'(      )       The following about P cannot be proved:
           $pe               one of its prime factor
              ^              squared
               >P            is greater than P
                  @w     Write P with a newline,
                    \    Backtrack to the last choice point and make
                         a different choice until there is no more
                         choice and the program halts.
</code>```

Title: Pretty Smooth Moves

Body:
In arithmetic, an n-smooth number, where n is a given prime number, is mathematically defined as a positive integer that has no prime factors greater than n. For example, 42 is 7-smooth because all its prime factors are less than or equal to 7, but 44 is not 7-smooth because it also has 11 as a prime factor.

Define a pretty smooth number as a number with no prime factors greater than its own square root. Thus, the list of pretty smooth numbers can be formulated as follows:

(EDITED!) 1 is a pretty smooth number, due to its complete lack of any prime factors. (Note that in the original version of this question, 1 was erroneously excluded from the list, so if you exclude it from your outputs you won't be marked wrong.)

Between 4 (= 22) and 8, the pretty smooth numbers are 2-smooth, meaning they have 2 as their only prime factor.

Between 9 (= 32) and 24, the pretty smooth numbers are 3-smooth, and can have 2s and 3s in their prime factorizations.

Between 25 (= 52) and 48, the pretty smooth numbers are 5-smooth, and can have 2s, 3s, and 5s in their prime factorizations.

And so on, upgrading the criteria every time the square of the next prime number is reached.

The list of pretty smooth numbers is fixed, and begins as follows: 1, 4, 8, 9, 12, 16, 18, 24, 25, ...

Your challenge is to write code that will output all pretty smooth numbers up to and including 10,000 (= 1002). There must be at least one separator (it doesn't matter what kind -- space, comma, newline, anything) between each number in the list and the next, but it is completely irrelevant what character is used.

As per usual, lowest byte count wins -- obviously, simply outputting the list isn't going to be too beneficial to you here. Good luck!

Body:
Brachylog, <s>21</s> 19 bytes

1 byte thanks to Fatalize, for inspiration of another 1 byte.

100^:4reP$ph^<=P@w\

Try it online!

Takes about 6 seconds here.

100^:4reP$ph^<=P@w\
100                      100
   ^                     squared
    :4                   [10000,4]
      r                  [4,10000]
       eP                P is an integer in that interval (choice point),
        P$ph^<=P         P, prime factorized (from biggest to smallest),
                         take the first element, squared, is less than
                         or equal to P
               P@w       Write P with a newline,
                  \      Backtrack to the last choice point and make
                         a different choice until there is no more
                         choice and the program halts.

Previous 21-byte solution

100^:4reP'($pe^>P)@w\

Try it online!

Takes about 6 seconds here.

100^:4reP'($pe^>P)@w\
100                      100
   ^                     squared
    :4                   [10000,4]
      r                  [4,10000]
       eP                P is an integer in that interval (choice point),
        P'(      )       The following about P cannot be proved:
           $pe               one of its prime factor
              ^              squared
               >P            is greater than P
                  @w     Write P with a newline,
                    \    Backtrack to the last choice point and make
                         a different choice until there is no more
                         choice and the program halts.


答:
SQF, <s>252</s> <s>227</s> 220

Standard script format:

```<code>#define Q(A,B) for #A from 2 to B do{
Q(i,10000)if([i]call{params["j"];u=sqrt j;a=true;Q(k,u)a=a and((j%k!=0)or(j/k<u)or!([j/k]call{params["x"];q=true;Q(z,sqrt x)q=q and(x%z!=0)};q}))};a})then{systemChat format["%1",i]}}
</code>```

Include the pre-processor in the compilation chain when calling eg:

execVM "FILENAME.sqf"

call compile preprocessFile "FILENAME.sqf"

This writes to the System Chat log, which is the closest thing SQF has to stdout

Title: Pretty Smooth Moves

Body:
SQF, <s>252</s> <s>227</s> 220

Standard script format:

#define Q(A,B) for #A from 2 to B do{
Q(i,10000)if([i]call{params["j"];u=sqrt j;a=true;Q(k,u)a=a and((j%k!=0)or(j/k<u)or!([j/k]call{params["x"];q=true;Q(z,sqrt x)q=q and(x%z!=0)};q}))};a})then{systemChat format["%1",i]}}

Include the pre-processor in the compilation chain when calling eg:

execVM "FILENAME.sqf"

call compile preprocessFile "FILENAME.sqf"

This writes to the System Chat log, which is the closest thing SQF has to stdout


答:
QBasic (QB64), 30 bytes, score = 28 / 30 = 0.9333 (cracked)

```<code>INPUT n:p=n MOD 2:?p*n+(n+p)/2
</code>```

Computes A014682, a version of the Collatz function (offset 0).

This works on the QB64 emulator with autoformatting turned off. It should work on actual QBasic as well, but I don't have a copy to test it.

My 28-byte version used a bitwise operator and integer division:

```<code>INPUT n:?(1AND n)*n+(n+.5)\2
</code>```

Title: Can you outgolf me? (Cops section)

Body:
Cops section

The robbers section can be found here.

Thanks to FryAmTheEggman, Peter Taylor, Nathan Merrill, xnor, Dennis, Laikoni and Mego for their contributions.

Challenge

Your task is to write 2 different programs (full programs/functions/etc.) in the same language and the same version (e.g. Python 3.5 ≠ Python 3.4, so that is not allowed), and when given n (using STDIN/function arguments/etc.), compute a(n) where a is an OEIS sequence of your choice. One of those programs is shorter than the other. You only need to submit the longer program of the two. The other one needs to be saved in case of not being cracked after 7 days. Your submission is cracked when your program has been outgolfed (whether it is by 1 byte or more).

For example, if the task you chose was to perform 2 × n, this could be a valid submission (in Python 2):

Python 2, 16 bytes, score = 15 / 16 = 0.9375

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

Computes A005843, (offset = 0).

If your submission has been cracked, then you need to state that in your header like so:

Python 2, 16 bytes, score = 15 / 16 = 0.9375, [cracked] + link

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

Computes A005843, (offset = 0).

Offset

This can be found on every OEIS page. For example, for A005843, the offset is 0,2. We only need to use the first one, which is 0. This means that the function is defined for all numbers ≥ 0.

In other words, the function OEIS(n) starts with n = 0. Your program needs to work for all cases given by OEIS.

More information can be found here.

Scoring

The score you get for your submission is equal to the following formula:

Score = Length (in bytes) of secret code ÷ Length (in bytes) of public code

The example above has the score 15 ÷ 16 = 0.9375.

The submission with the lowest score wins. Only submissions that have posted their solution will be eligible for winning.

Rules

The task you need to do is an OEIS sequence of your choice.

Given n, output OEIS(n). Deviation is not allowed, so you need to produce the exact same sequence (when given n, you need to output OEIS(n)).

Submissions that are not cracked within a period of 7 days are considered safe after the solution has been posted (submissions older than 7 days that do not have their solution posted are still vulnerable in being cracked).

In your submission, you need to post the following things: language name, byte count, full code, so no pastebin links etc. (to prevent answers like Unary), OEIS sequence, score with lengths of both programs and additionally, the encoding that is used.

Note: the same sequence cannot be posted twice in the same language. (For example, if the sequence A005843 has been done in Pyth, you cannot use Pyth again for that same sequence.)

Input and output are both in decimal (base 10)

Leaderboard

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

Uncracked submissions

 Language	 Score	 User

Sort by: score creation

Safe submissions

 Language	 Score	 User

```

Note

This challenge is finished. The final winner is feersum with his Seed answer. Congratulations! :).

You can still submit new cops, but be aware that they are no longer competing.

Body:
QBasic (QB64), 30 bytes, score = 28 / 30 = 0.9333 (cracked)

INPUT n:p=n MOD 2:?p*n+(n+p)/2

Computes A014682, a version of the Collatz function (offset 0).

This works on the QB64 emulator with autoformatting turned off. It should work on actual QBasic as well, but I don't have a copy to test it.

My 28-byte version used a bitwise operator and integer division:

INPUT n:?(1AND n)*n+(n+.5)\2


问:
Add two numbers
Input: Two integers. Preferably decimal integers, but other forms of numbers can be used. These can be given to the code in standard input, as arguments to the program or function, or as a list.

Output: Their sum. Use the same format for output integers as input integers. For example, the input 5 16 would lead to the output 21.

Restrictions: No standard loopholes please. This is code-golf, answer in lowest amount of bytes wins.

Notes: This should be fairly trivial, however I'm interested to see how it can be implemented. The answer can be a complete program or a function, but please identify which one it is.

Test cases:

```<code>1 2 -> 3
14 15 -> 29
7 9 -> 16
-1 8 -> 7
8 -9 -> -1
-8 -9 -> -17
</code>```

Or as CSV:

```<code>a,b,c
1,2,3
14,15,29
7,9,16
-1,8,7
8,-9,-1
-8,-9,-17
</code>```

Leaderboard

var QUESTION_ID=84260,OVERRIDE_USER=8478;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}</code>```

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

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

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

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

```

答:
SQF, 19

Using the function-as-a-file format:

```<code>params["x","y"];x+y
</code>```

Call as: [X, Y] call NAME_OF_COMPILED_FUNCTION

Title: Add two numbers

Body:
SQF, 19

Using the function-as-a-file format:

params["x","y"];x+y

Call as: [X, Y] call NAME_OF_COMPILED_FUNCTION


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

1 byte thanks to Jakube.

```<code>tf!f>*YYTPTS^T4
</code>```

Try it online!

```<code>tf!f>*YYTPTS^T4
             T   10
            ^T4  10000
           S^T4  [1,2,3,...,10000]
 f               filter for elements as T for
                 which the following is truthy:
         PT          prime factorization of T
   f                 filter for factor as Y:
     *YY                 Y*Y
    >   T                greater than T ?
  !                  logical negation
t                remove the first one (1)
</code>```

Title: Pretty Smooth Moves

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

1 byte thanks to Jakube.

tf!f>*YYTPTS^T4

Try it online!

tf!f>*YYTPTS^T4
             T   10
            ^T4  10000
           S^T4  [1,2,3,...,10000]
 f               filter for elements as T for
                 which the following is truthy:
         PT          prime factorization of T
   f                 filter for factor as Y:
     *YY                 Y*Y
    >   T                greater than T ?
  !                  logical negation
t                remove the first one (1)


答:
Python 2, 90 bytes

for i in range(4,10001):
 n=2;j=i
 while n*n<=j:
  while i%n<1:i/=n
  n+=1
 if i<2:print j
```

Ideone it!

Title: Pretty Smooth Moves

Body:
Python 2, 90 bytes

for i in range(4,10001):
 n=2;j=i
 while n*n<=j:
  while i%n<1:i/=n
  n+=1
 if i<2:print j

Ideone it!


问:
Shortest code to determine if a string is a palindrome
A palindrome is some string that is spelled the same way both backwards and forwards.  For instance, 'Eva, can I stab bats in a cave?' is a palindrome (EVACANISTAB | BATSINACAVE)

For this code golf, using the language of your choice, determine if a given string is a palindrome or not.

Edge Cases:

Punctuation is not counted towards palindrominess.

Control characters are not counted towards palindrominess.

Whitespace is not counted towards palindrominess.

Numbers are counted towards palindrominess.

Case in this challenge is not counted towards palindrominess.

There is no limit to the length of strings to evaluate, except for what is imposed by your language of choice.

For this challenge, limit yourself to the ASCII character set.

Technical Requirements:

Only method bodies are needed; additional things like method signatures, data structure declarations, etc. do not count towards the victory requirement.

Code must compile or interpret without compile-time errors or exceptions.

Code must not throw any unhandled exceptions or crash.  (Almost needless to say.  Almost.)

Code must return some value indicating palindrominess.  The data type depends on the language you use (e.g. a C# user might use a bool, whereas a JavaScript user could use a var.)

You may not write your own interpreter that performs this task as a 'native' capability so you can 'golf' a near-winning score.  (Hopefully needless to say.)

Victory Condition:

The shortest code in characters wins.

Current Leader: tmartin (k, 25 characters)

...Want the magic green check mark by your answer?  Beat this guy's answer!

答:
Jelly, 10 Characters

```<code>fØBŒl
UÇ⁼Ç
</code>```

Returns 1 if true, 0 if false

Try it Online!

Body:
Jelly, 10 Characters

fØBŒl
UÇ⁼Ç

Returns 1 if true, 0 if false

Try it Online!


问:
Showcase of Languages

Notes

This thread is open and unlocked only because the community decided to make an exception. Please do not use this question as evidence that you can ask similar questions here. Please do not create additional showcase questions.

This is no longer a popularity-contest, nor are snippet lengths limited by the vote tally. If you know this thread from before, please make sure you familiarize yourself with the changes.

This thread is dedicated to showing off interesting, useful, obscure, and/or unique features your favorite programming languages have to offer. This is neither a challenge nor a competition, but a collaboration effort to showcase as many programming languages as possible as well as possible.

How this works

All answers should include the name of the programming language at the top of the post, prefixed by a #.

Answers may contain one (and only one) factoid, i.e., a couple of sentences without code that describe the language.

Aside from the factoid, answers should consist of snippets of code, which can (but don't have to be) programs or functions.

The snippets do not need to be related. In fact, snippets that are too related may be redundant.

Since this is not a contest, all programming languages are welcome, whenever they were created.

Answers that contain more than a handful of code snippets should use a Stack Snippet to collapse everything except the factoid and one of the snippets.

Whenever possible, there should be only one answer per programming language. This is a community wiki, so feel free to add snippets to any answer, even if you haven't created it yourself. There is a Stack Snippet for compressing posts, which should mitigate the effect of the 30,000 character limit.

Answers that predate these guidelines should be edited. Please help updating them as needed.

Current answers, sorted alphabetically by language name

$.ajax({type:"GET",url:"https://api.stackexchange.com/2.2/questions/44680/answers?site=codegolf&filter=withbody",success:function(data){for(var i=0;i<data.items.length;i++){var temp=document.createElement('p');temp.innerHTML = data.items[i].body.split("\n")[0];$('#list').append('
' + temp.innerText || temp.textContent + '');}}})```
<pre class="snippet-code-html lang-html prettyprint-override"><code><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><base href="http://codegolf.stackexchange.com"><ul id="list"></ul></code>```

答:
SQF

Factoid:

SQF (Status Quo Function) is the scripting language for the Real Virtuality engines (O:FP, ArmA, ArmA 2, ArmA 3). The games written for the engine are functionally just mods made in SQF.

Length 0 Snippet:

This is technically valid SQF, and does nothing unless it is treated as code, in which case it is a no-op.

Length 1 Snippet:

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

+ does the usual things in SQF:

Concatenation of arrays

Concatenation of strings

Addition of numbers

And something really cool as well:

Deep-copying of arrays (as a unary prefix)

Length 2 Snippet:

```<code>_x
</code>```

_x is a magic variable which is used in these cases:

The current element in the optional predicate block argument of count (an array function)

The current element in the main block of a forEach block

Length 3 Snippet:

```<code>a-b
</code>```

This subtracts b from a, if the operation is applicable to the types of a and b.

Like quite a few things in SQF, it does something particularly neat with arrays:

When a and b are arrays, the result of a-b is the set exclusion of b from a

Title: Showcase of Languages

Body:
SQF

Factoid:

SQF (Status Quo Function) is the scripting language for the Real Virtuality engines (O:FP, ArmA, ArmA 2, ArmA 3). The games written for the engine are functionally just mods made in SQF.

Length 0 Snippet:

This is technically valid SQF, and does nothing unless it is treated as code, in which case it is a no-op.

Length 1 Snippet:

+

+ does the usual things in SQF:

Concatenation of arrays

Concatenation of strings

Addition of numbers

And something really cool as well:

Deep-copying of arrays (as a unary prefix)

Length 2 Snippet:

_x

_x is a magic variable which is used in these cases:

The current element in the optional predicate block argument of count (an array function)

The current element in the main block of a forEach block

Length 3 Snippet:

a-b

This subtracts b from a, if the operation is applicable to the types of a and b.

Like quite a few things in SQF, it does something particularly neat with arrays:

When a and b are arrays, the result of a-b is the set exclusion of b from a


答:
C, 113 bytes

#include<stdio.h>
main(a){for(;++a<10001;){int n=2,c=a;for(;n*n<=a;n++)while(c%n<1)c/=n;if(c<2)printf("%d ",a);}}
```

Ideone it!

Title: Pretty Smooth Moves

Body:
C, 113 bytes

#include<stdio.h>
main(a){for(;++a<10001;){int n=2,c=a;for(;n*n<=a;n++)while(c%n<1)c/=n;if(c<2)printf("%d ",a);}}

Ideone it!


问:
Produce the number 2014 without any numbers in your source code

Note to challenge writers as per meta consensus:
This question was well-received when it was posted, but challenges
like this, asking answerers to Do X without using
Y
are likely to be poorly received. Try using the
sandbox
to get feedback on if you want to post a similar challenge.

It's <s>2017</s> <s>2018</s> <s>2019</s> <s>2020</s> <s>2021</s> <s>2022</s> 2023 already, folks, go home.

So, now that it's 2014, it's time for a code question involving the number 2014.

Your task is to make a program that prints the number 2014, without using any of the characters 0123456789 in your code, and independently of any external variables such as the date or time or a random seed.

The shortest code (counting in bytes) to do so in any language in which numbers are valid tokens wins.

Leaderboard:

var QUESTION_ID=17005,OVERRIDE_USER=7110;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;```
<pre class="snippet-code-css lang-css prettyprint-override"><code>body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}</code>```

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

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

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

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

```

答:
Mathematica, 10 bytes

```<code>N[E,E^E^E]
</code>```

Prints the decimal expansion of the number e to over 3.8 million decimal places. The first occurrence of 2014 in that decimal expansion starts at the 3180th decimal place.

Body:
Mathematica, 10 bytes

N[E,E^E^E]

Prints the decimal expansion of the number e to over 3.8 million decimal places. The first occurrence of 2014 in that decimal expansion starts at the 3180th decimal place.


答:
Vim, <s>27</s> 23 keystrokes

First vim answer ever, haven't used vim at all really even.

```<code>A/<esc>:s#//#/\\<cr>:s#\./# .<cr>
</code>```

How it works: It appends a / at the end of line, subs // for /\, subs ./ for  .

Body:
Vim, <s>27</s> 23 keystrokes

First vim answer ever, haven't used vim at all really even.

A/<esc>:s#//#/\\<cr>:s#\./# .<cr>

How it works: It appends a / at the end of line, subs // for /\, subs ./ for  .