答:
Python, 46 bytes, score = 0.97826 (45 / 46) [cracked]

f=lambda n,k=1:n and-~f(n-("01"in bin(k)),k+1)
```

Calculates A101082 (offset = 1), which are:

Numbers n such that binary representation contains bit strings "10" and "01" (possibly overlapping).

@Dennis cracked the submission as intended, which was to replace "01"in bin(k) with some bit twiddling, namely (k&-k)+k&k>0, to check that k's binary representation isn't of the form 111...111000...000.

Title: Can you outgolf me? (Cops section)

Body:
Python, 46 bytes, score = 0.97826 (45 / 46) [cracked]

f=lambda n,k=1:n and-~f(n-("01"in bin(k)),k+1)

Calculates A101082 (offset = 1), which are:

Numbers n such that binary representation contains bit strings "10" and "01" (possibly overlapping).

@Dennis cracked the submission as intended, which was to replace "01"in bin(k) with some bit twiddling, namely (k&-k)+k&k>0, to check that k's binary representation isn't of the form 111...111000...000.


问:
The IHIH Pyramid
I find it fascinating how the letters "H" and "I" are very similar. "H" is a horizontal stroke surrounded by two vertical strokes; "I" is a vertical stroke surrounded by two horizontal strokes (depending on your font). I bet this could be nested... You know what that reminds me of? Fractals!!!

Let's define the "IHIH" pyramid as follows: The first iteration is this ASCII representation of the letter "I":

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

The next iteration has a vertical stroke on either side.

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

If you view the "I" in the middle as a single horizontal stroke, then this second iteration is basically an "H". The third iteration adds a horizontal stroke on the top and bottom

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

Again, if you view the "H" in the middle as a single vertical stroke, then this iteration is basically an "I". This pattern continues, alternating between "H"s and "I"s on every iteration. For reference, here are the first 6 iterations:

```<code>1:
---
 |
---

2:
|   |
|---|
| | |
|---|
|   |

3:
-------
 |   |
 |---|
 | | |
 |---|
 |   |
-------

4:
|       |
|-------|
| |   | |
| |---| |
| | | | |
| |---| |
| |   | |
|-------|
|       |

5:
-----------
 |       |
 |-------|
 | |   | |
 | |---| |
 | | | | |
 | |---| |
 | |   | |
 |-------|
 |       |
-----------

6:
|           |
|-----------|
| |       | |
| |-------| |
| | |   | | |
| | |---| | |
| | | | | | |
| | |---| | |
| | |   | | |
| |-------| |
| |       | |
|-----------|
|           |
</code>```

The Challenge:

Write a program or function that outputs the N'th iteration of the IHIH pyramid, and an optional trailing newline. Your input will be a single positive integer in whatever reasonable format you want. You do not have to handle invalid inputs, e.g. non-integers, numbers smaller than 1, etc. Your program must at the very least produce the right output for inputs up to 20. Since this is code-golf, standard loopholes are not allowed and the shortest answer in bytes wins!

答:
Actually, <s>48</s> <s>45</s> 44 bytes

This is an attempt to port my Ruby answer to Actually. This is way too long and golfing suggestions are very much appreciated. Try it online!

```<code>u;±ux♂A╗╜`╝╜";2@%2╛%u╛(2±&<I'-' '|++E"£MΣ.`M
</code>```

Here is a 46-byte version which separates out the nested functions so that we can define "| -" in fewer bytes. Try it online!

```<code>u;±ux♂A╗╜`;2@%2╛%u╛(2±&<I"| -"E`#"╝╜%r£MΣ."%£M
</code>```

Ungolfing:

First algorithm

```<code>u         Increment implicit input.
;±u       Duplicate, negate, increment. Stack: [-n n+1]
x♂A       Range [-n, n+1). Abs(x) over the range.
╗         Save list to register 0. Let's call it res.
╜         Push res so we can iterate over it.
  `         Start function (with y from map() at the end)
  ╝         Save y to register 1.
  ╜         Push res so we can iterate over it.
    "         Start function as string (with x from map() at the end)
    ;         Duplicate x.
    2@%       x mod 2.
    2╛%u      y mod 2 + 1.
    ╛(2±&<I   If x&-2 < y, then y%2+1, else x%2.
    '-' '|++  Push "| -" (We're inside a string right now,
                          so we need to push each char individually)
    E         Grab index of "| -"
    "£        End string and turn into function.
  M         Map over res.
  Σ.        sum() (into a string) and print.
  `         End function.
M         Map over res.
</code>```

Second algorithm

```<code>u;±ux♂A╗╜                  Create res as before.
`;2@%2╛%u╛(2±&<I"| -"E`#   The inner function from the first algorithm put into a list.
                             The only change to the function is the definition of "| -".
"╝╜  £MΣ."                 Most of the outer function from the first algorithm as a string.
   %r      %               %-formats the list into the outer function.
            £M             Turns the string into a function, maps over res.
</code>```

ContentLicense: CC BY-SA 3.0

Title: The IHIH Pyramid

Body:
Actually, <s>48</s> <s>45</s> 44 bytes

This is an attempt to port my Ruby answer to Actually. This is way too long and golfing suggestions are very much appreciated. Try it online!

u;±ux♂A╗╜`╝╜";2@%2╛%u╛(2±&<I'-' '|++E"£MΣ.`M

Here is a 46-byte version which separates out the nested functions so that we can define "| -" in fewer bytes. Try it online!

u;±ux♂A╗╜`;2@%2╛%u╛(2±&<I"| -"E`#"╝╜%r£MΣ."%£M

Ungolfing:

First algorithm

u         Increment implicit input.
;±u       Duplicate, negate, increment. Stack: [-n n+1]
x♂A       Range [-n, n+1). Abs(x) over the range.
╗         Save list to register 0. Let's call it res.
╜         Push res so we can iterate over it.
  `         Start function (with y from map() at the end)
  ╝         Save y to register 1.
  ╜         Push res so we can iterate over it.
    "         Start function as string (with x from map() at the end)
    ;         Duplicate x.
    2@%       x mod 2.
    2╛%u      y mod 2 + 1.
    ╛(2±&<I   If x&-2 < y, then y%2+1, else x%2.
    '-' '|++  Push "| -" (We're inside a string right now,
                          so we need to push each char individually)
    E         Grab index of "| -"
    "£        End string and turn into function.
  M         Map over res.
  Σ.        sum() (into a string) and print.
  `         End function.
M         Map over res.

Second algorithm

u;±ux♂A╗╜                  Create res as before.
`;2@%2╛%u╛(2±&<I"| -"E`#   The inner function from the first algorithm put into a list.
                             The only change to the function is the definition of "| -".
"╝╜  £MΣ."                 Most of the outer function from the first algorithm as a string.
   %r      %               %-formats the list into the outer function.
            £M             Turns the string into a function, maps over res.


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

答:
Excel, 16 bytes, score = 0.75, [cracked by Dennis♦]

```<code>=FACTDOUBLE(2*n)
</code>```

Computes A000165: double factorial of even numbers, (offset = 0).

Title: Can you outgolf me? (Cops section)

Body:
Excel, 16 bytes, score = 0.75, [cracked by Dennis♦]

=FACTDOUBLE(2*n)

Computes A000165: double factorial of even numbers, (offset = 0).


问:
Play a sound, any sound
Your program has to make the computer produce a sound, any sound.

Shortest code wins, not sooner than 10 days after the first valid answer. If there is a tie, the one submitted sooner, wins.

The program should run on a reasonable, not too uncommon personal computer.

Opening a pop-up, message box, etc. (for example, on a web page) does not count, as they might or might not produce a sound, depending on a lot of settings.

Just entering a wrong command or invalid character on a console and receiving a warning beep does not count, just as the compiler/interpreter/OS beeping on an error or crash does not count either. Your code must be a valid program.

答:
Autoit 6

```<code>Beep()
</code>```

Although declaring a function would allow for less characters, not counting the declaration:

```<code>z()
Func z()
Beep()
EndFunc
</code>```

Title: Play a sound, any sound

Body:
Autoit 6

Beep()

Although declaring a function would allow for less characters, not counting the declaration:

z()
Func z()
Beep()
EndFunc


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

答:
Python, <s>46</s> 45 bytes, Sp3000

f=lambda n,k=1:n and-~f(n-(k+(k&-k)&k>0),k+1)
```

Test it on Ideone.

Title: Can you outgolf me? (Robbers section)

Body:
Python, <s>46</s> 45 bytes, Sp3000

f=lambda n,k=1:n and-~f(n-(k+(k&-k)&k>0),k+1)

Test it on Ideone.


答:
Excel, <s>16</s> 12 bytes, Anastasiya-Romanova 秀

```<code>=FACT(n)*2^n
</code>```

I don't actually have Excel, but from what I read online, this should work.

Title: Can you outgolf me? (Robbers section)

Body:
Robbers section

The cops section can be found here.

Challenge

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

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

You could outgolf the cop by doing the following:

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

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

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

Post this with the following header:

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

For example:

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

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

Computes A005843, (offset = 0).

In that case, you have cracked the submission.

Scoring

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

Rules

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

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

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

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

Note

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

feersum: 16 cracks

Dennis: 12 cracks

Leaky Nun: 6 cracks

Lynn: 4 cracks

miles: 3 cracks

Martin Ender: 2 cracks

Emigna: 2 cracks

jimmy23013: 1 crack

Sp3000: 1 crack

randomra: 1 crack

alephalpha: 1 crack

nimi: 1 crack

Destructible Watermelon: 1 crack

Dom Hastings: 1 crack

Body:
Excel, <s>16</s> 12 bytes, Anastasiya-Romanova 秀

=FACT(n)*2^n

I don't actually have Excel, but from what I read online, this should work.


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

```

答:
VBA, 21 characters

```<code>?cells(,"BYL").column
</code>```

Write and run the above code in the Immediate Window. Basically, the code converts column name BYL to its column index (2014).

ContentLicense: CC BY-SA 4.0

Body:
VBA, 21 characters

?cells(,"BYL").column

Write and run the above code in the Immediate Window. Basically, the code converts column name BYL to its column index (2014).


问:
The Letter A without A
Your task is to display the letter "A" alone, without anything else, except any form of trailing newlines if you cannot avoid them, doing so in a program and/or snippet. Code that returns (instead of printing) is allowed.

Both the lowercase and uppercase versions of the letter "A" are acceptable (that is, unicode U+0061 or unicode U+0041. Other character encodings that aren't Unicode are allowed, but either way, the resulting output of your code must be the latin letter "A", and not any lookalikes or homoglyphs)

You must not use any of the below characters in your code, regardless of the character encoding that you pick:

"A", whether uppercase or lowercase.

"U", whether lowercase or uppercase.

X, whether uppercase or lowercase.

+

&

#

0

1

4

5

6

7

9

Cheating, loopholes, etc, are not allowed.

Since this is code-golf, the shortest solution, in bytes, that follows all the rules, is the winner.

Validity Checker

This Stack Snippet checks to make sure your code doesn't use the restricted characters. It might not work properly for some character encodings.

var t = prompt("Input your code.");

if (/[AaUuXx+&#0145679]/.test(t)) {
  alert("Contains a disallowed character!");
} else {
  alert("No disallowed characters");
}```
</div>
</div>
</p>

<p><em>This Stack Snippet that makes sure you don't have a disallowed character is also available on JSFiddle.</em></p>

<h3>Leaderboard</h3>

<p><div class="snippet" data-lang="js" data-hide="true" data-console="false" data-babel="false">
<div class="snippet-code snippet-currently-hidden">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var QUESTION_ID=90349,OVERRIDE_USER=58717;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="<h1>"+e.body.replace(OVERRIDE_REG,"")+"</h1>")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/<a/.test(o)&&(o=jQuery(o).text()),s[o]=s[o]||{lang:e.language,user:e.user,size:e.size,link:e.link}});var t=[];for(var o in s)s.hasOwnProperty(o)&&t.push(s[o]);t.sort(function(e,s){return e.lang>s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;</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}```
<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> <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b"> <div id="answer-list"> <h2>Leaderboard</h2> <table class="answer-list"> <thead> <tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr></thead> <tbody id="answers"> </tbody> </table> </div><div id="language-list"> <h2>Winners by Language</h2> <table class="language-list"> <thead> <tr><td>Language</td><td>User</td><td>Score</td></tr></thead> <tbody id="languages"> </tbody> </table> </div><table style="display: none"> <tbody id="answer-template"> <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td>Link</td></tr></tbody> </table> <table style="display: none"> <tbody id="language-template"> <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SIZE}}</td><td>Link</td></tr></tbody> </table></code>```

答:
Python 2, 16 bytes

```<code>print chr(88-23)
</code>```

Simpler but longer (21 bytes):

```<code>print chr(ord('c')-2)
</code>```

Title: The Letter A without A

Body:
Python 2, 16 bytes

print chr(88-23)

Simpler but longer (21 bytes):

print chr(ord('c')-2)


问:
Score Tarzan's Olympic Vine-Swinging Routine
Olympic vine-swingers perform their routines in standard trees.  In particular, Standard Tree n has vertices for 0 up through n-1 and edges linking each nonzero vertex a to the vertex n % a below it.  So, for example, Standard Tree 5 looks like this:

```<code>3
|
2   4
 \ /
  1
  |
  0
</code>```

because the remainder when 5 is divided by 3 is 2, the remainder when 5 is divided by 2 or by 4 is 1, and the remainder when 5 is divided by 1 is 0.

This year, Tarzan will be defending his gold with new routines, each of which begins at vertex n - 1, swings to vertex n - 2, continues to vertex n - 3, etc., until finally he dismounts to vertex 0.

The score for a routine is the sum of the scores for each swing (including the dismount), and the score for a swing is the distance within the tree between its start and end points.  Thus, Tarzan's routine on Standard Tree 5 has a score of 6:

a swing from 4 to 3 scores three points (down, up, up),

a swing from 3 to 2 scores one point (down),

a swing from 2 to 1 scores one point (down), and

a dismount from 1 to 0 scores one point (down).

Write a program or function that, given a positive integer n, computes the score of Tarzan's routine on Standard Tree n.  Sample inputs and outputs:

```<code> 1 ->  0
 2 ->  1
 3 ->  2
 4 ->  6
 5 ->  6
 6 -> 12
 7 -> 12
 8 -> 18
 9 -> 22
10 -> 32
11 -> 24
12 -> 34
13 -> 34
14 -> 36
15 -> 44
16 -> 58
17 -> 50
18 -> 64
19 -> 60
20 -> 66
21 -> 78
22 -> 88
23 -> 68
24 -> 82
</code>```

Rules and code scoring are as usual for code-golf.

答:
JavaScript (ES6), <s>118</s> 116 bytes

```<code>n=>[...Array(n)].map(g=(_,i)=>i?[...g(_,n%i),i]:[],r=0).reduce(g=(x,y,i)=>x.map(e=>r+=!y.includes(e))&&i?g(y,x):x)|r
</code>```

Lack of a set difference function really hurts, but some creative recursion reduces the byte count a bit. Edit: Saved 2 bytes by removing an unnecessary parameter.

Body:
JavaScript (ES6), <s>118</s> 116 bytes

n=>[...Array(n)].map(g=(_,i)=>i?[...g(_,n%i),i]:[],r=0).reduce(g=(x,y,i)=>x.map(e=>r+=!y.includes(e))&&i?g(y,x):x)|r

Lack of a set difference function really hurts, but some creative recursion reduces the byte count a bit. Edit: Saved 2 bytes by removing an unnecessary parameter.


问:
Exponentially Slimy Programming: Stacking Minecraft Slimes
Slimes are cube shaped enemies in Minecraft that break into multiple smaller versions of themselves when killed. For the purposes of this challenge we'll depict them as an 8×8 pixel image with 3 colors:

 ← True 8×8 version.

The precise RGB colors are:

0, 0, 0 for the eyes and mouth

110, 170, 90 for the central, darker green

116, 196, 96 for the outer, lighter green

Challenge

Write a program or function that takes in a positive integer N and outputs an image of N sizes of slimes packed into a rectangle. Going from left to right, the image should follow the pattern of having:

A stack of 2(N-1) 8×8 slimes.

A stack of 2(N-2) 16×16 slimes.

A stack of 2(N-3) 32×32 slimes.

And so on until the stack only contains one slime.

The slime images larger than the 8×8 version () are generated by nearest-neighbor upsampling (i.e. just doubling all the pixels). Note that you must use the exact slime design and colors given here.

The final image will contain 2N-1 slimes and be 2(N+3)-8 pixels wide and 2(N+2) pixels tall.

The image may be output in any common image file format, saved to a file or printed/returned as a raw data stream, or directly displayed during runtime.

The shortest code in bytes wins.

Examples

Your program should produce these exact results.

N = 1:

N = 2:

N = 3:

N = 4:

N = 5:

N = 6:

Larger N should work just as well.

答:
Mathematica, <s>267</s> <s>255</s> <s>254</s> <s>225</s> 212 bytes

```<code>G=10{11,17,9};Image@Join[##,2]&@@Table[Join@@Table[ImageData@ImageResize[Image[{t={g=G+{6,26,6},g,g,G,g,g,g,g},f={g,a=##&[G,G,G],a,g},e={g,b=0g,b,G,G,b,b,g},e,{a,a,G,g},{g,a,b,a},f,t}/255],4*2^j],2^(#-j)],{j,#}]&
</code>```

Saved <s>29</s> 42 bytes thanks to Martin Ender

Golfing suggestions welcome, especially for constructing the 8 by 8 (by 3) array s. Unfortunately, there is no "ArrayResize" analogue for ImageResize, so the array needs to be converted to an image (Image) before resizing, and then back to an array (ImageData) to do the Joining.

Ungolfed:

```<code>(* dark green, light green, black *)
G = 10 {11, 17, 9};
g = G + {6, 26, 6};
b = 0 g;

(* abbreviation for triple G sequence, top row, forehead, eye level *)
a = ##&[G, G, G];
t = {g, g, g, G, g, g, g, g};
f = {g, a, a, g};
e = {g, b, b, G, G, b, b, g};

(* slime *)
s =
  {
    t,
    f,
    e,
    e,
    {a, a, G, g},
    {g, a, b, a},
    f,
    t
  }/255;

(* jth column *)
c[n_, j_] := Join @@ Table[ImageData@ImageResize[Image[s], 4*2^j], 2^(n - j)]

(* final program *)
Image@Join[##, 2] & @@ Table[c[#, j], {j, #}] &
</code>```

Body:
Mathematica, <s>267</s> <s>255</s> <s>254</s> <s>225</s> 212 bytes

G=10{11,17,9};Image@Join[##,2]&@@Table[Join@@Table[ImageData@ImageResize[Image[{t={g=G+{6,26,6},g,g,G,g,g,g,g},f={g,a=##&[G,G,G],a,g},e={g,b=0g,b,G,G,b,b,g},e,{a,a,G,g},{g,a,b,a},f,t}/255],4*2^j],2^(#-j)],{j,#}]&

Saved <s>29</s> 42 bytes thanks to Martin Ender

Golfing suggestions welcome, especially for constructing the 8 by 8 (by 3) array s. Unfortunately, there is no "ArrayResize" analogue for ImageResize, so the array needs to be converted to an image (Image) before resizing, and then back to an array (ImageData) to do the Joining.

Ungolfed:

(* dark green, light green, black *)
G = 10 {11, 17, 9};
g = G + {6, 26, 6};
b = 0 g;

(* abbreviation for triple G sequence, top row, forehead, eye level *)
a = ##&[G, G, G];
t = {g, g, g, G, g, g, g, g};
f = {g, a, a, g};
e = {g, b, b, G, G, b, b, g};

(* slime *)
s =
  {
    t,
    f,
    e,
    e,
    {a, a, G, g},
    {g, a, b, a},
    f,
    t
  }/255;

(* jth column *)
c[n_, j_] := Join @@ Table[ImageData@ImageResize[Image[s], 4*2^j], 2^(n - j)]

(* final program *)
Image@Join[##, 2] & @@ Table[c[#, j], {j, #}] &


问:
Alphabet triangle strikes again

Task

Your task is to print this exact text:

```<code>A
BCD
EFGHI
JKLMNOP
QRSTUVWXY
ZABCDEFGHIJ
KLMNOPQRSTUVW
XYZABCDEFGHIJKL
MNOPQRSTUVWXYZABC
DEFGHIJKLMNOPQRSTUV
WXYZABCDEFGHIJKLMNOPQ
RSTUVWXYZABCDEFGHIJKLMN
OPQRSTUVWXYZABCDEFGHIJKLM
NOPQRSTUVWXYZABCDEFGHIJKLMN
OPQRSTUVWXYZABCDEFGHIJKLMNOPQ
RSTUVWXYZABCDEFGHIJKLMNOPQRSTUV
WXYZABCDEFGHIJKLMNOPQRSTUVWXYZABC
DEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL
MNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVW
XYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ
KLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXY
ZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP
QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI
JKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCD
EFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZA
BCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ
</code>```

Specs

You may do it in all-lowercase instead of all-uppercase.

Trailing newlines at the end of the triangle is allowed.

Trailing spaces after each line is allowed.

You must print to STDOUT instead of outputting an array of strings.

Scoring

This is code-golf. Program with lowest byte-count wins.

答:
Python 2, 65 bytes

i=1
a=bytearray(range(65,91))*26
while a:print a[:i];a=a[i:];i+=2
```

Title: Alphabet triangle strikes again


问:
Physics golf: inclined shooting
An angry bird is shot at an angle \$β\$ to the horizontal at a speed \$u\$. The ground is steep, inclined at an angle \$α\$. Find the horizontal distance \$q\$ that the bird traveled before it hit the ground.

Make a function \$f(α, β, u)\$ that returns the length \$q\$: the horizontal distance that the bird traveled before it hit the ground.

Constraints and notes:

\$-90° < α < 90°\$.

\$0° < β < 180°\$.

\$α < β\$.

\$0 \le u < 10^9\$.

Assume acceleration due to gravity \$g = 10\$.

You may use radians instead of degrees for \$α\$, \$β\$.

Dimensions of \$u\$ are irrelevant as long as they are consistent with \$g\$ and \$q\$.

No air resistance or anything too fancy.

Shortest code wins.

See the Wikipedia article on projectile motion for some equations.

Samples:

```<code>f(0, 45, 10) = 10
f(0, 90, 100) = 0
f(26.565, 45, 10) = 5
f(26.565, 135, 10) = 15
</code>```

答:
Haskell (<s>37</s> 35)

Based on Aman's solution:

```<code>q a b u=(tan a+tan b)*u*u*cos b^2/5
</code>```

I think, this problem isn't real code-golf, as it is more implementing a formula than really doing some algorithm.

Title: Physics golf: inclined shooting

Body:
Haskell (<s>37</s> 35)

Based on Aman's solution:

q a b u=(tan a+tan b)*u*u*cos b^2/5

I think, this problem isn't real code-golf, as it is more implementing a formula than really doing some algorithm.

ContentLicense: CC BY-SA 2.5


问:
Who's that Pokémon?
Input: an integer N between 1 and 151

Output: the Nth Pokemon.

Rules

You may use one data file.

You may not use any already made data decompression algorithms.  This includes libraries and other programs.

Your program may not access files other than itself and your data file.

Scoring

Your score is the sum of the length of your code and data file.

Helpful Stuff

Here's a list of the first 151 pokemon separated by semicolons to help you generate your data file.  Your output should exactly match the Nth entry of this line:

```<code>Bulbasaur;Ivysaur;Venusaur;Charmander;Charmeleon;Charizard;Squirtle;Wartortle;Blastoise;Caterpie;Metapod;Butterfree;Weedle;Kakuna;Beedrill;Pidgey;Pidgeotto;Pidgeot;Rattata;Raticate;Spearow;Fearow;Ekans;Arbok;Pikachu;Raichu;Sandshrew;Sandslash;Nidoran (f);Nidorina;Nidoqueen;Nidoran (m);Nidorino;Nidoking;Clefairy;Clefable;Vulpix;Ninetales;Jigglypuff;Wigglytuff;Zubat;Golbat;Oddish;Gloom;Vileplume;Paras;Parasect;Venonat;Venomoth;Diglett;Dugtrio;Meowth;Persian;Psyduck;Golduck;Mankey;Primeape;Growlith;Arcanine;Poliwag;Poliwhirl;Poliwrath;Abra;Kadabra;Alakazam;Machop;Machoke;Machamp;Bellsprout;Weepinbell;Victreebell;Tentacool;Tentacruel;Geodude;Graveler;Golem;Ponyta;Rapidash;Slowpoke;Slowbro;Magnemite;Magneton;Farfetch'd;Doduo;Dodrio;Seel;Dewgong;Grimer;Muk;Shellder;Cloyster;Gastly;Haunter;Gengar;Onix;Drowsee;Hypno;Krabby;Kingler;Voltorb;Electrode;Exeggute;Exeggutor;Cubone;Marowak;Hitmonlee;Hitmonchan;Lickitung;Koffing;Weezing;Rhyhorn;Rhydon;Chansey;Tangela;Kangaskhan;Horsea;Seadra;Goldeen;Seaking;Staryu;Starmie;Mr. Mime;Scyther;Jynx;Electabuzz;Magmar;Pinsir;Tauros;Magikarp;Gyarados;Lapras;Ditto;Eevee;Vaporeon;Jolteon;Flareon;Porygon;Omanyte;Omastar;Kabuto;Kabutops;Aerodactyl;Snorlax;Articuno;Zapdos;Moltres;Dratini;Dragonair;Dragonite;Mewtwo;Mew
</code>```

答:
GolfScript (1040 bytes)

Unfortunately I can't directly post the program, so I'll provide a link and the base64-encoded text:

```<code>fignACc1Nix7XFsxJF0nJysvXCdCdWxiNzYKSXZ5czY0dXM2CjJtMWQvMm0tZSsyaXozZCpxdSZ0
bCVXMyRydGwlQmw3JGlzJUMjMHBpImUhcB8KQnV0dDBmcmUlHmRsJUtha3VuYQpCZWVkHWxsG3kb
b3QkG290GiN0I2EaI2ljIyVTcGUzGQpGZTMZCkVrMXMYcmJvaxxpa2EXdRphaRd1KjFkc2hyZXcq
MWRzbDdoFWYpFnIUYRZxdWU1FW0pFnIUbxZrExEmeRFibCVWdWxwaXgKThRlIRJzCkoQcHVmZgpX
EHR1ZmYKWnViIw8OYiMKT2RkaXNoD2xvb20KVmkScGx1bSVQMzccMzdlY3Q0LCM0b21vdGgNaWcS
dHQNdWd0HW8MZRl0aBwwc2kxHHN5ZHVjaw8OZHVjawwxa2V5HB1tZQslR3IZbAloGHJjMRQlUAhh
ZxwIaCZsHAgHdGgYYgcGYWRhYgcYbGFrYXphbQUXb3AFF29rImEXYW1wCkItbHNwcm91dAoecBRi
LWwKVmljdHJlZWItbARvDgRydS0PZR91ZCVHB3YtL0cOZW0cLHkhGgtpZDdoKmwZcG9rJVNsGWJy
bwVnbmVtCSJhZ25ldCtGM2ZldBdcJ2QNH3VvDR8dbyplLQ1ld2csZw8dbS9NdWsqaC1sZC9DbG95
c3QvRzd0bHkKSGF1bnQvRzVnMwpPbml4DXIZc2UlSHlwbm8GB2JieQYTbC9WDiRyYgpFEmN0ch8D
dAMkcgpDdWIsIjMZYWsKSAltLBIlSAltLBcxCkxpY2sJdW5nBm9mZhMKHnoTGmh5aAJuGmh5ZCtD
aDFzZXkKVDFnLWEGMWc3a2gxCkgCc2VhKmVhZAcPDmRlNSplYWsTKnQzeXUqdDNtaSJyLiBNaW0l
U2N5dGgvSnlueApFEmMhYnV6egVnbTMcFHMmClQ2b3MFZ2lrM3APeTNhZG9zCkwLB3MNCSQKRWV2
ZSVWCwJlK0oOdGUrRmwzZSwcAnlnK09tMXl0JU9tN3QzAQFwcxgwH2FjdHlsKm4CbGF4GHJ0aWN1
bm8KWgtkb3MMDnRyZXMNB3QUaQ0HZyxhJg0HZywJImV3dHdvDGV3AAZhYnUkAG9yACVFeGVnZ3UA
ClQ1IWMADGEACksAcmEADml3AGl0AAoAYXAACk0ACkQAb2wACkcAaWdnbHkACkMSZmEAbGUAFGcA
aW4AFnIxICgACk5pZG8AY2gACkEAb3cAClIAHGlkZ2UAClAAcmkAV2VlAG9kACAAdGEAJU0AYXQA
dG8AZQoAaXIAXCcAKAApAApTACwKAG9uAGVsAC4AMAoAZXIAYW4AQ2gzAGFyAApWNQBlbgBhdXIA
YXMnJwAnLz0qfS9uLz0=
</code>```

It uses a grammar-based approach with rules separated by NUL characters and a simple expansion approach, followed by splitting on newlines and selecting the desired line. Input is via stdin. No external file is used.

In more detail

I have written a Java program which applies several grammar-generating strategies and two grammar-to-GolfScript generation strategies and outputs a lot of GS programs to reconstruct a string. In this particular case the winning combination was a greedy grammar builder with a threshold of 2, and the remap engine. The greedy grammar builder starts with a grammar

```<code><0> ::= "Bulbasaur\nIvysaur\nVenusaur\n..."
</code>```

and repeatedly looks for the repeated sequence of terminals and non-terminals in the right hand sides which, when pulled out into a rule defining a new non-terminal, produces the greatest decrease in the total number of terminals and non-terminals in the grammar. The threshold is the cutoff point at which the decrease is considered no longer worth it.

The non-terminals are topologically sorted and then numbered from 0 up. If they overlap any character values which are also terminals, the remap engine creates a new rule mapping to that terminal. (E.g. if there are rules 0 to 37 and the space character occurs, it will map 38 to the space character and then update the RHS of all rules to use 38 instead of 32). The right hand sides of the rules are then concatenated, separated by NULs, and a small piece of hand-written GolfScript to expand the grammar is appended.

Title: Who's that Pokémon?

Body:
GolfScript (1040 bytes)

Unfortunately I can't directly post the program, so I'll provide a link and the base64-encoded text:

fignACc1Nix7XFsxJF0nJysvXCdCdWxiNzYKSXZ5czY0dXM2CjJtMWQvMm0tZSsyaXozZCpxdSZ0
bCVXMyRydGwlQmw3JGlzJUMjMHBpImUhcB8KQnV0dDBmcmUlHmRsJUtha3VuYQpCZWVkHWxsG3kb
b3QkG290GiN0I2EaI2ljIyVTcGUzGQpGZTMZCkVrMXMYcmJvaxxpa2EXdRphaRd1KjFkc2hyZXcq
MWRzbDdoFWYpFnIUYRZxdWU1FW0pFnIUbxZrExEmeRFibCVWdWxwaXgKThRlIRJzCkoQcHVmZgpX
EHR1ZmYKWnViIw8OYiMKT2RkaXNoD2xvb20KVmkScGx1bSVQMzccMzdlY3Q0LCM0b21vdGgNaWcS
dHQNdWd0HW8MZRl0aBwwc2kxHHN5ZHVjaw8OZHVjawwxa2V5HB1tZQslR3IZbAloGHJjMRQlUAhh
ZxwIaCZsHAgHdGgYYgcGYWRhYgcYbGFrYXphbQUXb3AFF29rImEXYW1wCkItbHNwcm91dAoecBRi
LWwKVmljdHJlZWItbARvDgRydS0PZR91ZCVHB3YtL0cOZW0cLHkhGgtpZDdoKmwZcG9rJVNsGWJy
bwVnbmVtCSJhZ25ldCtGM2ZldBdcJ2QNH3VvDR8dbyplLQ1ld2csZw8dbS9NdWsqaC1sZC9DbG95
c3QvRzd0bHkKSGF1bnQvRzVnMwpPbml4DXIZc2UlSHlwbm8GB2JieQYTbC9WDiRyYgpFEmN0ch8D
dAMkcgpDdWIsIjMZYWsKSAltLBIlSAltLBcxCkxpY2sJdW5nBm9mZhMKHnoTGmh5aAJuGmh5ZCtD
aDFzZXkKVDFnLWEGMWc3a2gxCkgCc2VhKmVhZAcPDmRlNSplYWsTKnQzeXUqdDNtaSJyLiBNaW0l
U2N5dGgvSnlueApFEmMhYnV6egVnbTMcFHMmClQ2b3MFZ2lrM3APeTNhZG9zCkwLB3MNCSQKRWV2
ZSVWCwJlK0oOdGUrRmwzZSwcAnlnK09tMXl0JU9tN3QzAQFwcxgwH2FjdHlsKm4CbGF4GHJ0aWN1
bm8KWgtkb3MMDnRyZXMNB3QUaQ0HZyxhJg0HZywJImV3dHdvDGV3AAZhYnUkAG9yACVFeGVnZ3UA
ClQ1IWMADGEACksAcmEADml3AGl0AAoAYXAACk0ACkQAb2wACkcAaWdnbHkACkMSZmEAbGUAFGcA
aW4AFnIxICgACk5pZG8AY2gACkEAb3cAClIAHGlkZ2UAClAAcmkAV2VlAG9kACAAdGEAJU0AYXQA
dG8AZQoAaXIAXCcAKAApAApTACwKAG9uAGVsAC4AMAoAZXIAYW4AQ2gzAGFyAApWNQBlbgBhdXIA
YXMnJwAnLz0qfS9uLz0=

It uses a grammar-based approach with rules separated by NUL characters and a simple expansion approach, followed by splitting on newlines and selecting the desired line. Input is via stdin. No external file is used.

In more detail

I have written a Java program which applies several grammar-generating strategies and two grammar-to-GolfScript generation strategies and outputs a lot of GS programs to reconstruct a string. In this particular case the winning combination was a greedy grammar builder with a threshold of 2, and the remap engine. The greedy grammar builder starts with a grammar

<0> ::= "Bulbasaur\nIvysaur\nVenusaur\n..."

and repeatedly looks for the repeated sequence of terminals and non-terminals in the right hand sides which, when pulled out into a rule defining a new non-terminal, produces the greatest decrease in the total number of terminals and non-terminals in the grammar. The threshold is the cutoff point at which the decrease is considered no longer worth it.

The non-terminals are topologically sorted and then numbered from 0 up. If they overlap any character values which are also terminals, the remap engine creates a new rule mapping to that terminal. (E.g. if there are rules 0 to 37 and the space character occurs, it will map 38 to the space character and then update the RHS of all rules to use 38 instead of 32). The right hand sides of the rules are then concatenated, separated by NULs, and a small piece of hand-written GolfScript to expand the grammar is appended.


答:
Mathematica, 90 bytes

```<code>StringRiffle[Flatten[Alphabet[]&~Array~26]~Internal`PartitionRagged~Range[1,51,2],"
",""]&
</code>```

Anonymous function. Takes no input and returns a string as output. Golfing suggestions welcome. An example of what Internal`PartitionRagged does:

```<code>In[1]:= Internal`PartitionRagged[{2, 3, 5, 7, 11, 13}, {2, 3, 1}]

Out[1]= {{2, 3}, {5, 7, 11}, {13}}
</code>```

Title: Alphabet triangle strikes again

Body:
Task

Your task is to print this exact text:

```<code>A
BCD
EFGHI
JKLMNOP
QRSTUVWXY
ZABCDEFGHIJ
KLMNOPQRSTUVW
XYZABCDEFGHIJKL
MNOPQRSTUVWXYZABC
DEFGHIJKLMNOPQRSTUV
WXYZABCDEFGHIJKLMNOPQ
RSTUVWXYZABCDEFGHIJKLMN
OPQRSTUVWXYZABCDEFGHIJKLM
NOPQRSTUVWXYZABCDEFGHIJKLMN
OPQRSTUVWXYZABCDEFGHIJKLMNOPQ
RSTUVWXYZABCDEFGHIJKLMNOPQRSTUV
WXYZABCDEFGHIJKLMNOPQRSTUVWXYZABC
DEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL
MNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVW
XYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ
KLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXY
ZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP
QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI
JKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCD
EFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZA
BCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ
</code>```

Specs

You may do it in all-lowercase instead of all-uppercase.

Trailing newlines at the end of the triangle is allowed.

Trailing spaces after each line is allowed.

You must print to STDOUT instead of outputting an array of strings.

Scoring

This is code-golf. Program with lowest byte-count wins.

Body:
Mathematica, 90 bytes

StringRiffle[Flatten[Alphabet[]&~Array~26]~Internal`PartitionRagged~Range[1,51,2],"
",""]&

Anonymous function. Takes no input and returns a string as output. Golfing suggestions welcome. An example of what Internal`PartitionRagged does:

In[1]:= Internal`PartitionRagged[{2, 3, 5, 7, 11, 13}, {2, 3, 1}]

Out[1]= {{2, 3}, {5, 7, 11}, {13}}


问:
The Great Pyramid of ASCII

Introduction

It's 2600 BC and people are building pyramids now. They already made the basis of the pyramid but don't know how to continue. So, they called you for help.

The rules of making a pyramid is quite simple. For the layer above the previous layer, all you need to do is follow this step-by-step hand guide:

Cut the edges off the previous layer.

Above the / character, there must be a \ character and vice versa. This applies to every character except the edges.

The leftmost character is always a / and the rightmost character is always \.

Let's take an example of a basis for a pyramid:

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

We cut off the edges, leaving:

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

We change the forward slashes with backward slashes and vice versa:

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

The leftmost character is always a / and the rightmost character is always a \, so we change that:

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

We place this layer on the previous layer:

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

We continue until the top is reached (which looks like /\). So, eventually we get:

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

This is what you need to output.

The task

Given the basis of a pyramid (with a length greater than 3), output the full pyramid. You can safely assume that the leftmost character is / and the rightmost character is a \. You can also assume that the length of the basis is always even. The use of trailing spaces is allowed. The use of leading spaces is also allowed, as long as the pyramid stays in place. The use of 1 trailing and 1 leading newlines is allowed.

Test cases

```<code>Input: /\\\
Output:
 /\
/\\\

Input: //\\///\/\
Output:
    /\
   /\\\
  /\///\
 ///\\\/\
//\\///\/\

Input: /////////////\
Output:
      /\
     /\\\
    /////\
   /\\\\\\\
  /////////\
 /\\\\\\\\\\\
/////////////\
</code>```

This is code-golf, so the submission with the least amount of bytes wins!

答:
Go, <s>300</s> 276 bytes

package main
import(."regexp";."os")
func p(b string)string{
s:=MustCompile(`((\s*.)(\S*)(\S))`).FindStringSubmatch(b)
if s[3]!=""{r:=""
for _,c:=range s[3][1:len(s[3])-1]{r+=`\/`[c/64:c/46]}
return p(" "+s[2]+r+`\`)+s[1]+"\n"}
return s[1]+"\n"}
func main(){print(p(Args[1]))}
```

<p>Long version:</p>

```package main

import (
    "regexp"
    "os"
)

func pyramid(base string) string {
    m := regexp.MustCompile(`^((\s*\S)(\S*)(\S))\s*`).FindStringSubmatch(base)
    if len(m[3]) > 0 {
        reversed := ""
        for _, c := range m[3][1:len(m[3]) - 1] {
            if c == '/' {
                reversed += `\`
            } else {
                reversed += `/`
            }
        }
        return pyramid(" " + m[2] + reversed + m[4]) + m[1] + "\n"
    }
    return m[1] + "\n"
}

func main() {
    print(pyramid(os.Args[1]))
}
```

Title: The Great Pyramid of ASCII

Body:
Go, <s>300</s> 276 bytes

package main
import(."regexp";."os")
func p(b string)string{
s:=MustCompile(`((\s*.)(\S*)(\S))`).FindStringSubmatch(b)
if s[3]!=""{r:=""
for _,c:=range s[3][1:len(s[3])-1]{r+=`\/`[c/64:c/46]}
return p(" "+s[2]+r+`\`)+s[1]+"\n"}
return s[1]+"\n"}
func main(){print(p(Args[1]))}

Long version:

package main

import (
    "regexp"
    "os"
)

func pyramid(base string) string {
    m := regexp.MustCompile(`^((\s*\S)(\S*)(\S))\s*`).FindStringSubmatch(base)
    if len(m[3]) > 0 {
        reversed := ""
        for _, c := range m[3][1:len(m[3]) - 1] {
            if c == '/' {
                reversed += `\`
            } else {
                reversed += `/`
            }
        }
        return pyramid(" " + m[2] + reversed + m[4]) + m[1] + "\n"
    }
    return m[1] + "\n"
}

func main() {
    print(pyramid(os.Args[1]))
}


答:
JavaScript, 129 bytes

```<code>z=1,i=0,g=a=>{b=0,c="";while(a+a-1>b){c+='ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split``[i>26?i=0:i++];b++}console.log(c)};while(z<26)g(z++)
</code>```

Title: Alphabet triangle strikes again

Body:
JavaScript, 129 bytes

z=1,i=0,g=a=>{b=0,c="";while(a+a-1>b){c+='ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split``[i>26?i=0:i++];b++}console.log(c)};while(z<26)g(z++)


答:
Pyke, 14 bytes

```<code>G26*WDoh<
Ko>D
</code>```

Try it here!

Title: Alphabet triangle strikes again

Body:
Pyke, 14 bytes

G26*WDoh<
Ko>D

Try it here!


答:
Go, 133 bytes

```<code>package main
import S "strings"
func main(){s:=S.Repeat("ABCDEFGHIJKLMNOPQRSTUVXXYZ",26)
for i:=1;s!="";i+=2{println(s[:i]);s=s[i:]}}
</code>```

Title: Alphabet triangle strikes again

Body:
Go, 133 bytes

package main
import S "strings"
func main(){s:=S.Repeat("ABCDEFGHIJKLMNOPQRSTUVXXYZ",26)
for i:=1;s!="";i+=2{println(s[:i]);s=s[i:]}}


答:
C, 79 bytes

main(i,j){for(i=0,j=1;i<676;i++){putchar(i%26+65);if(j*j==i+1){puts("");j++;}}}
```

My first answer in C \o/

Golfing suggestions are more than welcome.

Title: Alphabet triangle strikes again

Body:
C, 79 bytes

main(i,j){for(i=0,j=1;i<676;i++){putchar(i%26+65);if(j*j==i+1){puts("");j++;}}}

My first answer in C \o/

Golfing suggestions are more than welcome.


答:
C#, 164 bytes

void a(){int i=0;Console.Write(String.Join("\n",Enumerable.Range(0,26).Select(n=>new string(Enumerable.Range(0,n*2+1).Select(m=>(char)(97+(i++)%26)).ToArray()))));}
```

Title: Alphabet triangle strikes again


Title: Alphabet triangle strikes again

Body:
Pyth, 14 bytes

V26:*26G^N2^hN2

Try it here!

V26             - for N in range(26):
        ^N2     -   N**2
   :*26G        -  (alphabet*26)[^:V]
           ^hN2 -   (N+1)**2


问:
Shortest power set implementation

Problem definition

Print out the powerset of a given set. For example:

```<code>[1, 2, 3] => [[], [1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3]]
</code>```

Each element is to be printed on a separate line, so the above example would be printed as:

```<code>[]
[1]
[2]
...
[1, 2, 3]
</code>```

Example code (in D, python example here):

```<code>import std.stdio;

string[][] powerset(string[] set) {
    if (set.length == 1) {
        return [set, []];
    }

    string[][] ret;
    foreach (item; powerset(set[1 .. $])) {
        ret ~= set[0]~item;
        ret ~= item;
    }

    return ret;
}

void main(string[] argv) {
    foreach (set; powerset(argv[1 .. $]))
        writeln(set);
}
</code>```

Input

Elements will be passed as arguments. For example, the example provided above would be passed to a program called powerset as:

```<code>powerset 1 2 3
</code>```

Arguments will be alphanumeric.

Rules

No libraries besides io

Output does not have to be ordered

Powerset does not have to be stored, only printed

Elements in the set must be delimited (e.g. 1,2,3, [1,2,3] and ['1','2','3'] are acceptable, but 123 is not

Trailing delimiters are fine (e.g. 1,2,3, == 1,2,3)

Best is determined based on number of bytes

The best solution will be decided no less than 10 days after the first submission.

答:
GolfScript (43 chars)

This may seem quite long, but it's the first solution to follow the spec: input is from command-line arguments, and output is newline-delimited.

```<code>"#{ARGV.join('
')}"n/[[]]\1/{`{1$+.p}+%}%p;
</code>```

E.g.

```<code>$ golfscript.rb powset.gs 1 2 3
["1"]
["2"]
["2" "1"]
["3"]
["3" "2"]
["3" "1"]
["3" "2" "1"]
[]
</code>```

Title: Shortest power set implementation

Body:
GolfScript (43 chars)

This may seem quite long, but it's the first solution to follow the spec: input is from command-line arguments, and output is newline-delimited.

"#{ARGV.join('
')}"n/[[]]\1/{`{1$+.p}+%}%p;

E.g.

$ golfscript.rb powset.gs 1 2 3
["1"]
["2"]
["2" "1"]
["3"]
["3" "2"]
["3" "1"]
["3" "2" "1"]
[]


答:
Pyth, 12 bytes

```<code>jtc*G26*Rd26
</code>```

Try it online!

Title: Alphabet triangle strikes again

Body:
Pyth, 12 bytes

jtc*G26*Rd26

Try it online!


答:
Vim, 29 bytes

```<code>:h<_↵↵↵y$ZZ26P0qqa↵♥βjllq25@q
</code>```

Where ↵ represents the Return key, ♥ the Escape key, and β the Backspace key.

Title: Alphabet triangle strikes again

Body:
Vim, 29 bytes

:h<_↵↵↵y$ZZ26P0qqa↵♥βjllq25@q

Where ↵ represents the Return key, ♥ the Escape key, and β the Backspace key.


答:
Brachylog, 37 bytes

```<code>26~l<:1aLc~j[@A:I],L~@nw
=:2%1,.#@l?,
</code>```

Try it online!

Explanation

Main predicate:

```<code>26~l         Let there be a list of 26 elements
<            This list is an ascending list of integers
:1aL         Apply predicate 1 to that list ; the resulting list of strings is L
c            Concatenate the list of strings into one big string
~j[@A:I],    That big string is the result of juxataposing the alphabet I times to itself
L~@n         Create a string which when splitted on line breaks results in L
w            Write that string to STDOUT
</code>```

Predicate 1: used to generate variable strings of odd lengths.

```<code>=            Assign a value to the Input
:2%1,        That value must be odd
.#@l?,       Output is a string of length Input
</code>```

Title: Alphabet triangle strikes again

Body:
Brachylog, 37 bytes

26~l<:1aLc~j[@A:I],L~@nw
=:2%1,.#@l?,

Try it online!

Explanation

Main predicate:

26~l         Let there be a list of 26 elements
<            This list is an ascending list of integers
:1aL         Apply predicate 1 to that list ; the resulting list of strings is L
c            Concatenate the list of strings into one big string
~j[@A:I],    That big string is the result of juxataposing the alphabet I times to itself
L~@n         Create a string which when splitted on line breaks results in L
w            Write that string to STDOUT

Predicate 1: used to generate variable strings of odd lengths.

=            Assign a value to the Input
:2%1,        That value must be odd
.#@l?,       Output is a string of length Input


问:
Is this number a prime?
Believe it or not, we do not yet have a code golf challenge for a simple primality test. While it may not be the most interesting challenge, particularly for "usual" languages, it can be nontrivial in many languages.

Rosetta code features lists by language of idiomatic approaches to primality testing, one using the Miller-Rabin test specifically and another using trial division. However, "most idiomatic" often does not coincide with "shortest." In an effort to make Programming Puzzles and Code Golf the go-to site for code golf, this challenge seeks to compile a catalog of the shortest approach in every language, similar to "Hello, World!" and Golf you a quine for great good!.

Furthermore, the capability of implementing a primality test is part of our definition of programming language, so this challenge will also serve as a directory of proven programming languages.

Task

Write a full program that, given a strictly positive integer n as input, determines whether n is prime and prints a truthy or falsy value accordingly.

For the purpose of this challenge, an integer is prime if it has exactly two strictly positive divisors. Note that this excludes 1, who is its only strictly positive divisor.

Your algorithm must be deterministic (i.e., produce the correct output with probability 1) and should, in theory, work for arbitrarily large integers. In practice, you may assume that the input can be stored in your data type, as long as the program works for integers from 1 to 255.

Input

If your language is able to read from STDIN, accept command-line arguments or any other alternative form of user input, you can read the integer as its decimal representation, unary representation (using a character of your choice), byte array (big or little endian) or single byte (if this is your languages largest data type).

If (and only if) your language is unable to accept any kind of user input, you may hardcode the input in your program.

In this case, the hardcoded integer must be easily exchangeable. In particular, it may appear only in a single place in the entire program.

For scoring purposes, submit the program that corresponds to the input 1.

Output

Output has to be written to STDOUT or closest alternative.

If possible, output should consist solely of a truthy or falsy value (or a string representation thereof), optionally followed by a single newline.

The only exception to this rule is constant output of your language's interpreter that cannot be suppressed, such as a greeting, ANSI color codes or indentation.

Additional rules

This is not about finding the language with the shortest approach for prime testing, this is about finding the shortest approach in every language. Therefore, no answer will be marked as accepted.

Submissions in most languages will be scored in bytes in an appropriate preexisting encoding, usually (but not necessarily) UTF-8.

The language Piet, for example, will be scored in codels, which is the natural choice for this language.

Some languages, like Folders, are a bit tricky to score. If in doubt, please ask on Meta.

Unlike our usual rules, feel free to use a language (or language version) even if it's newer than this challenge. If anyone wants to abuse this by creating a language where the empty program performs a primality test, then congrats for paving 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.

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 Headsecks or Unary), consider adding a note to the existing answer that the same or a very similar solution is also the shortest in the other language.

Built-in functions for testing primality are allowed. This challenge is meant to catalog the shortest possible solution in each language, so if it's shorter to use a built-in in your language, go for it.

Unless they have been overruled earlier, all standard code-golf rules apply, including the http://meta.codegolf.stackexchange.com/q/1061.

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 catalog as complete as possible. However, do primarily upvote answers in languages where the author actually had to put effort into golfing the code.

Catalog

The Stack Snippet at the bottom of this post generates the catalog 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>## [><>](http://esolangs.org/wiki/Fish), 121 bytes
</code>```

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

Shortest Solution by Language

Language	User	Score

Leaderboard

	Author	Language	Size

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

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

```

答:
WolframAlpha, 10 bytes

```<code>isprime(n)
</code>```

Title: Is this number a prime?

Body:
WolframAlpha, 10 bytes

isprime(n)


答:
Batch, 123 bytes

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

Title: Alphabet triangle strikes again

Body:
Batch, 123 bytes

@set s=
@for /l %%i in (1,2,51)do @call set s=%%s%%ABCDEFGHIJKLMNOPQRSTUVWXYZ&call echo %%s:~0,%%i%%&call set s=%%s:~%%i%%


问:
All in all it's just, uh, another trick in code golf
The purpose of this challenge is to produce an ASCII version of the cover of this great album by the rock band Pink Floyd.

The brick junctions are made of characters _ and |. Bricks have width 7 and height 2 characters, excluding junctions. So the basic unit, including the junctions, is:

```<code>_________
|       |
|       |
_________
</code>```

Each row of bricks is offset by half a brick width (4 chars) with respect to the previous row:

```<code>________________________________________
  |       |       |       |       |
  |       |       |       |       |
________________________________________
      |       |       |       |       |
      |       |       |       |       |
________________________________________
  |       |       |       |       |
  |       |       |       |       |
</code>```

The wall is parameterized as follows. All parameters are measured in chars including junctions:

Horizontal offset of first row, F. This is the distance between the left margin and the first vertical junction of the upmost row. (Remember also the half-brick relative offset between rows). Its possible values are 0, 1, ..., 7.

Total width, W. This includes junctions. Its value is a positive integer.

Total height, H. This includes junctions. Its value is a positive integer.

The top of the wall always coincides with the top of a row. The bottom may be ragged (if the total height is not a multiple of 3). For example, here's the output for 6, 44, 11:

```<code>____________________________________________
      |       |       |       |       |
      |       |       |       |       |
____________________________________________
  |       |       |       |       |       |
  |       |       |       |       |       |
____________________________________________
      |       |       |       |       |
      |       |       |       |       |
____________________________________________
  |       |       |       |       |       |
</code>```

and a visual explanation of parameters:

```<code>          F=6
         ......
     .   ____________________________________________
     .         |       |       |       |       |
     .         |       |       |       |       |
     .   ____________________________________________
     .     |       |       |       |       |       |
H=11 .     |       |       |       |       |       |
     .   ____________________________________________
     .         |       |       |       |       |
     .         |       |       |       |       |
     .   ____________________________________________
     .     |       |       |       |       |       |

         ............................................
                             W=44
</code>```

Additional rules

You may provide a program or a function.

Input format is flexible as usual. Output may be through STDOUT or an argument returned by a function. In this case it may be a string with newlines or an array of strings.

Trailing spaces or newlines are allowed.

Shortest code in bytes wins.

Test cases

Inputs are in the order given above, that is: horizontal offset of first row, total width, total height.

```<code>6, 44, 11:
____________________________________________
      |       |       |       |       |
      |       |       |       |       |
____________________________________________
  |       |       |       |       |       |
  |       |       |       |       |       |
____________________________________________
      |       |       |       |       |
      |       |       |       |       |
____________________________________________
  |       |       |       |       |       |

2, 20, 10:
____________________
  |       |       |
  |       |       |
____________________
      |       |
      |       |
____________________
  |       |       |
  |       |       |
____________________

1, 1, 1:
_

1, 2, 3:
__
 |
 |

3, 80, 21:
________________________________________________________________________________
   |       |       |       |       |       |       |       |       |       |
   |       |       |       |       |       |       |       |       |       |
________________________________________________________________________________
       |       |       |       |       |       |       |       |       |       |
       |       |       |       |       |       |       |       |       |       |
________________________________________________________________________________
   |       |       |       |       |       |       |       |       |       |
   |       |       |       |       |       |       |       |       |       |
________________________________________________________________________________
       |       |       |       |       |       |       |       |       |       |
       |       |       |       |       |       |       |       |       |       |
________________________________________________________________________________
   |       |       |       |       |       |       |       |       |       |
   |       |       |       |       |       |       |       |       |       |
________________________________________________________________________________
       |       |       |       |       |       |       |       |       |       |
       |       |       |       |       |       |       |       |       |       |
________________________________________________________________________________
   |       |       |       |       |       |       |       |       |       |
   |       |       |       |       |       |       |       |       |       |
</code>```

答:
Dyalog APL, 29 bytes

↑⎕⍴⎕⍴¨a,4⌽¨a←'_',2⍴⊂⌽⎕⌽¯8↑'|'

tests:
6 44 11,
2 20 10,
1 1 1,
1 2 3,
3 80 21

⎕ is evaluated input; as the expression executes from right to left, it prompts for F, W, and H in that order

¯8↑'|' is '       |'

⎕⌽ is rotate, it chops F chars from the front and puts them at the end of the string

the other ⌽ means reverse

'_',2⍴⊂ creates a 3-tuple of '_' followed by two separate copies of the string so far

a,4⌽¨a← append the 4-rotation of everything so far, we end up with a 6-tuple

⎕⍴¨ reshape each element to the width

⎕⍴ reshape to the height

↑ mix vector of vectors into a matrix


问:
The Piggyback Sequence
I made my own sequence recently (called the Piggyback sequence), and it works like this:

P(1), P(2) and P(3) = 1.

For all P(n) where n>3, the sequence works like this:

```<code>P(n) = P(n-3) + P(n-2)/P(n-1)
</code>```

So, continuing the sequence:

P(4) = 1 + 1/1 = 2

P(5) = 1 + 1/2 = 3/2
= 1.5

P(6) = 1 + 2/(3/2) = 7/3
= 2.33333...

P(7) = 2 + (3/2)/(7/3) = 37/14 = 2.6428571428...

P(8) = 3/2 + (7/3)/(37/14) = 529/222
= 2.3828828828...

Your task is, when given n, calculate P(n) either as a floating point number or an (im)proper fraction.

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

If anyone can find the name of the sequence, please edit the post accordingly.

Current leaders: MATL and Jelly (both at 15 bytes).

答:
Python 2, 40 39 bytes.

```<code>f=lambda x:x<4or.0+f(x-3)+f(x-2)/f(x-1)
</code>```

Gives True instead of 1, if this isn't allowed we can have this for 42 bytes:

```<code>f=lambda x:.0+(x<4or f(x-3)+f(x-2)/f(x-1))
</code>```

The way it works is pretty straightforward, the only trick is using .0+ to cast the result to a float.

Title: The Piggyback Sequence

Body:
Python 2, 40 39 bytes.

f=lambda x:x<4or.0+f(x-3)+f(x-2)/f(x-1)

Gives True instead of 1, if this isn't allowed we can have this for 42 bytes:

f=lambda x:.0+(x<4or f(x-3)+f(x-2)/f(x-1))

The way it works is pretty straightforward, the only trick is using .0+ to cast the result to a float.


问:
Score my golf round!
Since this SE community is about golfing, I thought a golf-related challenge would be appropriate.

Explanation

Normally, the objective of golf is to finish a hole (and consequently, the entire round) with the least amount of strokes. This is a simple version of golf: Play until you hole the ball and sum up your score. Finally subtract it from the total par and the resulting number indicates your score: 0 if you played exactly par, positive if you played worse and negative if you played better.

But in 1898 a guy named Dr. Frank Barney Gorton Stableford devised a new system of playing which was designed to be more forgiving. This system awards a number of points to a player, based on a relative rating per hole, called the stroke index (SI) which is based on a player rating called handicap. This limits the amount of points a player can lose per hole. Additionally, the handiccp ensures fair competition between players despite skill difference.

This format isn't used in professional golf, but can be found almost anywhere in amateur golf.

The scoring algorithm

For anyone unfamiliar with golf, the algorithm for scoring a hole based version is as follows.

Beginning with the hardest hole (rating 1) to the easiest one (rating 18), increase the stroke index of that hole by 1 and decrement the handicap. If you exhaust the handicap, stop. If you hit the easiest hole you wrap around to the hardest and continue. (Ex: stroke index for hcp 24 and [1..18]: [2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1]).

For every score on a hole, subtract it from the sum of par and stroke index and add 2 (formula: (par + stroke index) - achieved score + 2). These are the stableford points received for that hole. Note that you cannot receive less than 0 points.

Sum up all the points. The resulting total is the total number of stableford points.

Thus, reaching 36 points is equivalent to playing exactly one's handicap, and more points are better.

Rules

Your task will be to calculate the total number of stableford points of an arbitrary golf round on an arbitrary golf course given a handicap.

You will be given a list of difficulty ratings, a list of pars, a list of scores and the handicap to use. You may order these arguments as you wish, but please state how you order them.

You may write a function ot program, input can be taken either as command line argument or function argument.

Output may either be printed to STDOUT or the return value of a function.

You may assume the following about the input:

Every list will contain exactly 18 elements.

The lists are orderd by hole: First element = info for first hole, etc.

The handicap will be an integer between 0 and 54 inclusive.

Pars will be between 3 and 7.

The score is always a positive integer.

The difficulty rating list will always be a permutation of [1..18].

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

Examples

```<code>Input: hcp: 0
       difficulty: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]
       pars: [3,3,3,3,4,4,4,4,4,4,4,4,4,4,5,5,5,5]
       score: [3,3,3,3,4,4,4,4,4,4,4,4,4,4,5,5,5,5]
Output: 36

Input: hcp: 15
       difficulty: [9,3,1,13,11,17,15,7,5,18,14,10,4,6,12,16,8,2]
       pars: [4,4,4,3,5,4,3,4,4,4,3,4,4,4,5,3,5,4]
       score: [5,5,4,5,4,4,4,4,5,7,3,5,5,6,4,6,5,5]
Output: 38

Input: hcp: 28
       difficulty: [9,3,1,13,11,17,15,7,5,18,14,10,4,6,12,16,8,2]
       pars: [4,4,4,3,5,4,3,4,4,4,3,4,4,4,5,3,5,4]
       score: [5,5,5,6,3,7,3,6,5,8,4,6,7,8,4,7,6,5]
Outut: 37

Input: hcp: 54
       difficulty: [9,3,1,13,11,17,15,7,5,18,14,10,4,6,12,16,8,2]
       pars: [4,4,4,3,5,4,3,4,4,4,3,4,4,4,5,3,5,4]
       score: [9,10,9,10,9,10,9,10,9,10,9,10,9,10,9,10,9,10]
Output: 3
</code>```

Happy golfing!

Title: Score my golf round!

Body:
JavaScript (ES6), 72 bytes

(h,d,p,s)=>s.map((e,i)=>(e=p[i]+2-e+(h%18>=d[i])+h/18|0)<0?0:r+=e,r=0)|r


答:
Retina, 8 bytes

```<code>M`
T`O`L
</code>```

Try it online!

Explanation

```<code>M`
</code>```

This counts the number of matches of the empty regex in the empty input, so it produces a 1.

```<code>T`O`L
</code>```

This is a transliteration which substitutes characters from the first set with corresponding characters from the second set. However, O and L are shorthands which expand to the odd digits and the upper case alphabet, respectively, so this replaces the 1 with A.

Title: The Letter A without A

Body:
Your task is to display the letter "A" alone, without anything else, except any form of trailing newlines if you cannot avoid them, doing so in a program and/or snippet. Code that returns (instead of printing) is allowed.

Both the lowercase and uppercase versions of the letter "A" are acceptable (that is, unicode U+0061 or unicode U+0041. Other character encodings that aren't Unicode are allowed, but either way, the resulting output of your code must be the latin letter "A", and not any lookalikes or homoglyphs)

You must not use any of the below characters in your code, regardless of the character encoding that you pick:

"A", whether uppercase or lowercase.

"U", whether lowercase or uppercase.

X, whether uppercase or lowercase.

+

&

#

0

1

4

5

6

7

9

Cheating, loopholes, etc, are not allowed.

Since this is code-golf, the shortest solution, in bytes, that follows all the rules, is the winner.

Validity Checker

This Stack Snippet checks to make sure your code doesn't use the restricted characters. It might not work properly for some character encodings.

var t = prompt("Input your code.");

if (/[AaUuXx+&#0145679]/.test(t)) {
  alert("Contains a disallowed character!");
} else {
  alert("No disallowed characters");
}```
</div>
</div>
</p>

<p><em>This Stack Snippet that makes sure you don't have a disallowed character is also available on JSFiddle.</em></p>

<h3>Leaderboard</h3>

<p><div class="snippet" data-lang="js" data-hide="true" data-console="false" data-babel="false">
<div class="snippet-code snippet-currently-hidden">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var QUESTION_ID=90349,OVERRIDE_USER=58717;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="<h1>"+e.body.replace(OVERRIDE_REG,"")+"</h1>")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/<a/.test(o)&&(o=jQuery(o).text()),s[o]=s[o]||{lang:e.language,user:e.user,size:e.size,link:e.link}});var t=[];for(var o in s)s.hasOwnProperty(o)&&t.push(s[o]);t.sort(function(e,s){return e.lang>s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;</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}```
<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> <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b"> <div id="answer-list"> <h2>Leaderboard</h2> <table class="answer-list"> <thead> <tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr></thead> <tbody id="answers"> </tbody> </table> </div><div id="language-list"> <h2>Winners by Language</h2> <table class="language-list"> <thead> <tr><td>Language</td><td>User</td><td>Score</td></tr></thead> <tbody id="languages"> </tbody> </table> </div><table style="display: none"> <tbody id="answer-template"> <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td>Link</td></tr></tbody> </table> <table style="display: none"> <tbody id="language-template"> <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SIZE}}</td><td>Link</td></tr></tbody> </table></code>```

Body:
Retina, 8 bytes

M`
T`O`L

Try it online!

Explanation

M`

This counts the number of matches of the empty regex in the empty input, so it produces a 1.

T`O`L

This is a transliteration which substitutes characters from the first set with corresponding characters from the second set. However, O and L are shorthands which expand to the odd digits and the upper case alphabet, respectively, so this replaces the 1 with A.


答:
C, 118 115

Whilst can save approx 20 chars with simpler formatting, still not going to win in code golf terms either way.

```<code>x,i,f;
main(int a,char**s){
    for(;x<1<<a;x+=2,puts("[]"+f))
        for(i=f=0;++i<a;)x&1<<i?f=!!printf("%c%s","[,"[f],s[i]):0;
}
</code>```

Testing:

```<code>/a.out 1 2 3
[]
[1]
[2]
[1,2]
[3]
[1,3]
[2,3]
[1,2,3]
</code>```

Title: Shortest power set implementation

Body:
Problem definition

Print out the powerset of a given set. For example:

```<code>[1, 2, 3] => [[], [1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3]]
</code>```

Each element is to be printed on a separate line, so the above example would be printed as:

```<code>[]
[1]
[2]
...
[1, 2, 3]
</code>```

Example code (in D, python example here):

```<code>import std.stdio;

string[][] powerset(string[] set) {
    if (set.length == 1) {
        return [set, []];
    }

    string[][] ret;
    foreach (item; powerset(set[1 .. $])) {
        ret ~= set[0]~item;
        ret ~= item;
    }

    return ret;
}

void main(string[] argv) {
    foreach (set; powerset(argv[1 .. $]))
        writeln(set);
}
</code>```

Input

Elements will be passed as arguments. For example, the example provided above would be passed to a program called powerset as:

```<code>powerset 1 2 3
</code>```

Arguments will be alphanumeric.

Rules

No libraries besides io

Output does not have to be ordered

Powerset does not have to be stored, only printed

Elements in the set must be delimited (e.g. 1,2,3, [1,2,3] and ['1','2','3'] are acceptable, but 123 is not

Trailing delimiters are fine (e.g. 1,2,3, == 1,2,3)

Best is determined based on number of bytes

The best solution will be decided no less than 10 days after the first submission.

Body:
C, 118 115

Whilst can save approx 20 chars with simpler formatting, still not going to win in code golf terms either way.

x,i,f;
main(int a,char**s){
    for(;x<1<<a;x+=2,puts("[]"+f))
        for(i=f=0;++i<a;)x&1<<i?f=!!printf("%c%s","[,"[f],s[i]):0;
}

Testing:

/a.out 1 2 3
[]
[1]
[2]
[1,2]
[3]
[1,3]
[2,3]
[1,2,3]


问:
Print every printable ASCII character without using it
In a programming language of your choice, write 95 programs, each of which outputs a different one of the 95 printable ASCII characters without that character occurring anywhere in the program.

For example, if your language was Python, your program that outputs the character P might be

```<code>print(chr(80))
</code>```

because P has ASCII code 80. This program is valid because P never appears in the source code. However, for the program that outputs lowercase p, something like

```<code>print(chr(112))
</code>```

would be invalid because, while it does print p, p is present in the code. A valid program could be

```<code>exec(chr(112)+'rint(chr(112))')
</code>```

which prints p but does not contain p.

Your goal is to make each of your 95 programs as short as possible. Your score is the sum of the character lengths of all your programs.

If for any reason you are unable to write valid programs for some characters, you may mark those characters as "Did Not Program" or DNP, and omit programs for them entirely. This way syntactically strict languages will be able to compete.

The winning answer is the answer that has the lowest score of the set of answers that have the fewest DNP's.

Rules

The source code of all of your programs may only contain printable ASCII plus tabs and newlines, all of which are counted as one character. (Because in a different encoding it would be easy to omit characters that don't exist!)

Note: This rule seems necessary but there are many languages with different encodings and I'm sure it'd be cool to see the answers for them. Therefore you can break this rule, you can use whatever characters you want, but then your answer becomes non-competitive, it cannot win.

The programs must be actual, full programs, according to your language's standard conventions. Functions and REPL snippets are not allowed.

Each program's output should go to stdout or your language's accepted alternative.

Programs should not prompt for or require input. (If prompting for input is inherent to your language, that's ok.)

Programs should be deterministic, finite in run time, and independent. e.g. it shouldn't matter if one is run in a folder separate from the other programs.

A program's output should be the precise printable ASCII character it corresponds to, optionally followed by a single trailing newline, nothing more, nothing less.

Be sure to include information on all 95 (ideally) programs in your answer, as well as your score and any DNP's. You don't have to list all programs that follow a simple pattern like "print(chr(80)), print(chr(81)), print(chr(82))..." but make sure you're sure they all would work and that your score is added correctly.

For reference, here are the 95 printable ASCII your programs must output:

```<code> !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
</code>```

答:
Pyke, <s>364</s> <s>362</s> 355 bytes

```<code>2*1 + 3*2 + 14*3 + 2*4 + 5 + 73*4
</code>```

All in the form w<chr(charcode+32)>.C (4 bytes) except for:

  -> d 1 byte

0 -> Z 1 byte

1 -> ~W 2 bytes

a -> Gh 2 bytes

z -> Ge 2 bytes

First 10 lowercase alphabet letters (except a) in form G<number>@ (3 bytes)

k -> GT@ 3 bytes

> -> ~Bh 3 bytes

] -> ~Be 3 bytes

Z -> ~le 3 bytes

9 -> ~ue 3 bytes

w -> G22@ 4 bytes

. -> ~B4@ 4 bytes

C -> ~K38@ 5 bytes

Online Pyke interpreter

Body:
Pyke, <s>364</s> <s>362</s> 355 bytes

2*1 + 3*2 + 14*3 + 2*4 + 5 + 73*4

All in the form w<chr(charcode+32)>.C (4 bytes) except for:

  -> d 1 byte

0 -> Z 1 byte

1 -> ~W 2 bytes

a -> Gh 2 bytes

z -> Ge 2 bytes

First 10 lowercase alphabet letters (except a) in form G<number>@ (3 bytes)

k -> GT@ 3 bytes

> -> ~Bh 3 bytes

] -> ~Be 3 bytes

Z -> ~le 3 bytes

9 -> ~ue 3 bytes

w -> G22@ 4 bytes

. -> ~B4@ 4 bytes

C -> ~K38@ 5 bytes

Online Pyke interpreter


答:
MATLAB, <s>112 109 95 79</s> 77 bytes

This will also work with Octave, you can try online here.

```<code>a=['' 65:90 65:90]';j=0;for i=1:2:52;b=circshift(a,j);j=j-i;disp(b(1:i)');end
</code>```

So after some major changes, I've saved a further <s>14</s> 32 bytes. This one is getting to be much more like the length I would have expected from MATLAB. I've left the old version below as it is substantially different.

```<code>a=['' 65:90 65:90]';        %Create 2 copies of the upper case alphabet
j=0;                        %Initialise cumulative sum
for i=1:2:52;               %For each line length
    b=circshift(a,j);       %Rotate the alphabet string by the cumulative offset
    j=j-i;                  %Update cumulative negative sum of offsets.
    disp(
         b(1:i)'            %Extract first 'line length' characters from rotated alphabet.
               );           %Display next line (disp adds newline automatically)
end
</code>```

Original version:

```<code>a=['' repmat(65:90,1,26)];c=cumsum(1:2:51);disp(cell2mat(arrayfun(@(s,f)[a(s:f) 10],[1,c(1:25)+1],c,'Un',0)))
</code>```

Wow that one ended up being longer than I thought it would. I'll see if I can't knock a few bytes off it.

An ungolfed version to explain:

```<code>a=['' repmat(65:90,1,26)]; %Create 26 copies of the upper case alphabet
c=cumsum(1:2:51);          %Calculate the end index of each row in the above array, by cumulatively summing the length of each line
disp(
     cell2mat(
              arrayfun(@(s,f)
                             [a(s:f) 10], %Extract the part of the alphabet and insert a new line.
                                         [1,c(1:25)+1],c, %start index is the previous end of line plus 1. End index is as calculated by cumsum.
                       'Un',0 %The returned values are not all the same length
                       )   %Do this for each line
              )            %Convert back to a matrix now new lines inserted
     )                     %And display it
</code>```

Acknowledgements

3 bytes saved - thanks @LuisMendo

Title: Alphabet triangle strikes again

Body:
Task

Your task is to print this exact text:

```<code>A
BCD
EFGHI
JKLMNOP
QRSTUVWXY
ZABCDEFGHIJ
KLMNOPQRSTUVW
XYZABCDEFGHIJKL
MNOPQRSTUVWXYZABC
DEFGHIJKLMNOPQRSTUV
WXYZABCDEFGHIJKLMNOPQ
RSTUVWXYZABCDEFGHIJKLMN
OPQRSTUVWXYZABCDEFGHIJKLM
NOPQRSTUVWXYZABCDEFGHIJKLMN
OPQRSTUVWXYZABCDEFGHIJKLMNOPQ
RSTUVWXYZABCDEFGHIJKLMNOPQRSTUV
WXYZABCDEFGHIJKLMNOPQRSTUVWXYZABC
DEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL
MNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVW
XYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ
KLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXY
ZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP
QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI
JKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCD
EFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZA
BCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ
</code>```

Specs

You may do it in all-lowercase instead of all-uppercase.

Trailing newlines at the end of the triangle is allowed.

Trailing spaces after each line is allowed.

You must print to STDOUT instead of outputting an array of strings.

Scoring

This is code-golf. Program with lowest byte-count wins.

Body:
MATLAB, <s>112 109 95 79</s> 77 bytes

This will also work with Octave, you can try online here.

a=['' 65:90 65:90]';j=0;for i=1:2:52;b=circshift(a,j);j=j-i;disp(b(1:i)');end

So after some major changes, I've saved a further <s>14</s> 32 bytes. This one is getting to be much more like the length I would have expected from MATLAB. I've left the old version below as it is substantially different.

a=['' 65:90 65:90]';        %Create 2 copies of the upper case alphabet
j=0;                        %Initialise cumulative sum
for i=1:2:52;               %For each line length
    b=circshift(a,j);       %Rotate the alphabet string by the cumulative offset
    j=j-i;                  %Update cumulative negative sum of offsets.
    disp(
         b(1:i)'            %Extract first 'line length' characters from rotated alphabet.
               );           %Display next line (disp adds newline automatically)
end

Original version:

a=['' repmat(65:90,1,26)];c=cumsum(1:2:51);disp(cell2mat(arrayfun(@(s,f)[a(s:f) 10],[1,c(1:25)+1],c,'Un',0)))

Wow that one ended up being longer than I thought it would. I'll see if I can't knock a few bytes off it.

An ungolfed version to explain:

a=['' repmat(65:90,1,26)]; %Create 26 copies of the upper case alphabet
c=cumsum(1:2:51);          %Calculate the end index of each row in the above array, by cumulatively summing the length of each line
disp(
     cell2mat(
              arrayfun(@(s,f)
                             [a(s:f) 10], %Extract the part of the alphabet and insert a new line.
                                         [1,c(1:25)+1],c, %start index is the previous end of line plus 1. End index is as calculated by cumsum.
                       'Un',0 %The returned values are not all the same length
                       )   %Do this for each line
              )            %Convert back to a matrix now new lines inserted
     )                     %And display it

Acknowledgements

3 bytes saved - thanks @LuisMendo


答:
Dyalog APL, <s>31</s> <s>25</s> 23 bytes

Requires ⎕IO←0, which is default on many systems.

↑(∊1,¨0⍴¨⍨2×⍳26)⊂676⍴⎕A
```

676⍴⎕A cycle the letters to get 676 of them

(...)⊂ split on ones in

 ⍳26 zero through 25; {0, 1, 2, 3, ..., 25}

 2× multiply them by 2, {0, 2, 4, 6, ..., 50}

 0⍴¨⍨ generate zero-sequences of such lengths; {}, {0}, {0, 0}, etc.

 1,¨ prepend one to each sequence; {1}, {1, 0}, {1, 0, 0}, etc.

 ∊ flatten; {1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, ..., 0}

↑ stack the strings

TryAPL online!

-6 thanks to @jimmy23013

Title: Alphabet triangle strikes again

Body:
Dyalog APL, <s>31</s> <s>25</s> 23 bytes

Requires ⎕IO←0, which is default on many systems.

↑(∊1,¨0⍴¨⍨2×⍳26)⊂676⍴⎕A

676⍴⎕A cycle the letters to get 676 of them

(...)⊂ split on ones in

 ⍳26 zero through 25; {0, 1, 2, 3, ..., 25}

 2× multiply them by 2, {0, 2, 4, 6, ..., 50}

 0⍴¨⍨ generate zero-sequences of such lengths; {}, {0}, {0, 0}, etc.

 1,¨ prepend one to each sequence; {1}, {1, 0}, {1, 0, 0}, etc.

 ∊ flatten; {1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, ..., 0}

↑ stack the strings

TryAPL online!

-6 thanks to @jimmy23013


答:
Fourier, 306 bytes, 1 DNP

Pretty much all of the programs follow the pattern na where n is the character code of each of the characters. For example:

```<code>!       33a
"       34a
#       35a
$       36a
%       37a
&       38a
'       39a
</code>```

Try it online!

So I'll just list the exceptions:

0 (Zero)

Since the accumulator is preset to zero, we can display this using a single character:

```<code>o
</code>```

Try it online!

1

Similar to zero, this increments the accumulator to get 1.

```<code>^o
</code>```

Try it online!

5

The ASCII code for 5 is 53, so I had to work around this:

```<code>6vo
</code>```

Try it online!

a

Due to a being the character output function, there is no other way to produce the character a, so this my only DID NOT PROGRAM.

See all of the programs here

Title: Print every printable ASCII character without using it

Body:
In a programming language of your choice, write 95 programs, each of which outputs a different one of the 95 printable ASCII characters without that character occurring anywhere in the program.

For example, if your language was Python, your program that outputs the character P might be

```<code>print(chr(80))
</code>```

because P has ASCII code 80. This program is valid because P never appears in the source code. However, for the program that outputs lowercase p, something like

```<code>print(chr(112))
</code>```

would be invalid because, while it does print p, p is present in the code. A valid program could be

```<code>exec(chr(112)+'rint(chr(112))')
</code>```

which prints p but does not contain p.

Your goal is to make each of your 95 programs as short as possible. Your score is the sum of the character lengths of all your programs.

If for any reason you are unable to write valid programs for some characters, you may mark those characters as "Did Not Program" or DNP, and omit programs for them entirely. This way syntactically strict languages will be able to compete.

The winning answer is the answer that has the lowest score of the set of answers that have the fewest DNP's.

Rules

The source code of all of your programs may only contain printable ASCII plus tabs and newlines, all of which are counted as one character. (Because in a different encoding it would be easy to omit characters that don't exist!)

Note: This rule seems necessary but there are many languages with different encodings and I'm sure it'd be cool to see the answers for them. Therefore you can break this rule, you can use whatever characters you want, but then your answer becomes non-competitive, it cannot win.

The programs must be actual, full programs, according to your language's standard conventions. Functions and REPL snippets are not allowed.

Each program's output should go to stdout or your language's accepted alternative.

Programs should not prompt for or require input. (If prompting for input is inherent to your language, that's ok.)

Programs should be deterministic, finite in run time, and independent. e.g. it shouldn't matter if one is run in a folder separate from the other programs.

A program's output should be the precise printable ASCII character it corresponds to, optionally followed by a single trailing newline, nothing more, nothing less.

Be sure to include information on all 95 (ideally) programs in your answer, as well as your score and any DNP's. You don't have to list all programs that follow a simple pattern like "print(chr(80)), print(chr(81)), print(chr(82))..." but make sure you're sure they all would work and that your score is added correctly.

For reference, here are the 95 printable ASCII your programs must output:

```<code> !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
</code>```

Body:
Fourier, 306 bytes, 1 DNP

Pretty much all of the programs follow the pattern na where n is the character code of each of the characters. For example:

!       33a
"       34a
#       35a
$       36a
%       37a
&       38a
'       39a

Try it online!

So I'll just list the exceptions:

0 (Zero)

Since the accumulator is preset to zero, we can display this using a single character:

o

Try it online!

1

Similar to zero, this increments the accumulator to get 1.

^o

Try it online!

5

The ASCII code for 5 is 53, so I had to work around this:

6vo

Try it online!

a

Due to a being the character output function, there is no other way to produce the character a, so this my only DID NOT PROGRAM.

See all of the programs here