答:
MATL, <s>12</s> 11 bytes

```<code>TF-|Z}&Z*!p
</code>```

Input is a column vector, with the format [0.55; 0.67; 0.13]

Try it online!

```<code>TF    % Push [1, 0]
-     % Subtract from implicit input (column array), with broadcast. Gives a 2-col
      % matrix where the first column is the input minus 1 and the second is the input
|     % Absolute value
Z}    % Split the matrix into its rows
&Z*   % Cartesian product of all resulting. This gives a matrix as result, with each
      % "combination" on a different row
!p    % Product of each row. Implicitly display
</code>```

Body:
MATL, <s>12</s> 11 bytes

TF-|Z}&Z*!p

Input is a column vector, with the format [0.55; 0.67; 0.13]

Try it online!

TF    % Push [1, 0]
-     % Subtract from implicit input (column array), with broadcast. Gives a 2-col
      % matrix where the first column is the input minus 1 and the second is the input
|     % Absolute value
Z}    % Split the matrix into its rows
&Z*   % Cartesian product of all resulting. This gives a matrix as result, with each
      % "combination" on a different row
!p    % Product of each row. Implicitly display


问:
N-dimensional Circles!
Write a program that takes two numbers as its input. The first one is the number of dimensions - 0 for a dot, 1 for a straight line, 2 for a circle, 3 for a sphere. The second number is the radius of the object, or, if it's 1-dimensional, the number itself. Output 0 for 0 dimensions. The output is the length/area/volume of the object.

If we call the first number n, the second one r, and the output x, we get that:

for n = 0, x = 1

for n = 1, x = 2×r

for n = 2, x = r2×π

for n = 3, x = (4/3)×r3×π

and so on... if you want, though.

Notes:

Cases when one or both numbers are negative, or when the first number is not whole, don't need to be covered.

The program must not read from any file and the only input are those two numbers.

The output should use only numerals (e.g. not "14*pi"), and should be accurate to at least two decimal digits.

As for n = 0, you can output 0 if it makes the code shorter.

Extra swag for an answer covering even 4 and more-dimensional "spheres"!

It's code-golf, so the shortest answer in bytes wins!

Examples:

```<code> 1 1 -> 2

 2 3 -> 28,27

 3 1 -> 4,19

 3 4,5 -> 381,70

 1 9.379 -> 18.758

 0 48 -> 1
</code>```

答:
Racket 69 bytes (plus extra swag)

Uses recursive formula from https://en.wikipedia.org/w/index.php?title=Volume_of_an_n-ball&section=3#Recursions

Including suggestions by @wchargin

```<code>(define(v d r)(match d[0 1][1(* 2 r)][_(/(* 2 pi r r(v(- d 2)r))d)]))
</code>```

Ungolfed (v=volume, d=dimensions, r=radius):

```<code>(define(v d r)
  (match d
    [0 1]
    [1 (* 2 r)]
    [_ (/ (*  2   pi   r   r   (v (- d 2) r)  )
          d)]
    ))
</code>```

Testing:

```<code>(v 1 1)
(v 2 3)
(v 3 1)
(v 3 4.5)
(v 1 9.379)
(v 0 48)
</code>```

Output:

```<code>2
28.274333882308138
4.1887902047863905
381.7035074111599
18.758
1
</code>```

ContentLicense: CC BY-SA 3.0

Title: N-dimensional Circles!

Body:
Racket 69 bytes (plus extra swag)

Uses recursive formula from https://en.wikipedia.org/w/index.php?title=Volume_of_an_n-ball&section=3#Recursions

Including suggestions by @wchargin

(define(v d r)(match d[0 1][1(* 2 r)][_(/(* 2 pi r r(v(- d 2)r))d)]))

Ungolfed (v=volume, d=dimensions, r=radius):

(define(v d r)
  (match d
    [0 1]
    [1 (* 2 r)]
    [_ (/ (*  2   pi   r   r   (v (- d 2) r)  )
          d)]
    ))

Testing:

(v 1 1)
(v 2 3)
(v 3 1)
(v 3 4.5)
(v 1 9.379)
(v 0 48)

Output:

2
28.274333882308138
4.1887902047863905
381.7035074111599
18.758
1


问:
How many integers contain a number in a specific range
The program should take input the number, the start of the range and the end of the range, and output how many integers the number appears between the start and end of the range, inclusive. Both programs and functions are allowed.

Example Inputs

For example:

```<code>//Input example 1
3,1,100
//Input example 2
3
1
100
//Input example 3
3 1 100
//Input example 4
a(3, 1, 100);
</code>```

All the above four input examples are valid and all of them mean that 3 is the number in question, 1 is the beginning of the range and 100 the the end of the range.

And then the program should output how many times 3 appears in the range from 1 to 100 inclusive. 3 appears in the integers 3, 13, 23, 30, 31, 32, 33, ..., 93 at a total of 19 times. So the program should output 19 as the output because that is how many times 3 appears in the range from 1 to 100.

Rules

Both programs and functions are allowed.

All numbers will be integers, meaning that there will not be any floats or doubles.

Note: the sought number will always be in the range 0≤x≤127. There will be no cases where it will be outside this 0≤x≤127 range.

As in the first example, with the case as 33, the number 3 will be counted as appearing only once, not twice.

The values of the start and end of the range will be between -65536 and 65535 inclusive.

The value of range's start will never exceed or equal to range's end. start < end

Also the range is inclusive. For example if the input was 8 8 10, the range would be 8≤x≤10 and hence the output will be 1.

Input can be taken in any of the ways shown in the examples. Input can be taken as a string or as a number, any way you wish.

Test Cases

```<code>3 1 100
19

3 3 93
19

12,-200,200
24          //This is because 12 appears in -129, -128, ..., -112, -12, 12, 112, 120, 121, 122, ...

123,1,3
0           //This is because all of 123's digits have to appear in the same order

3 33 34
2           //Because 3 appears in 2 numbers: 33 and 34

a(0,-1,1);
1

$ java NotVerbose 127 -12 27
0
</code>```

Snack Snippet

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

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

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

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

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

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

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

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

/* Configuration */

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

/* App */

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

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

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

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

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

getAnswers();

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

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

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

function process() {
  var valid = [];

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

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

  });

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

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

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

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

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

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

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

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

table thead {
  font-weight: bold;
}

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

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

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

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

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

```

答:
Racket 91 bytes

```<code>(for/sum((i(range s(+ 1 e))))(if(string-contains?(number->string i)(number->string d))1 0))
</code>```

Ungolfed:

```<code>(define(f d s e)
  (for/sum ((i (range s (+ 1 e))))
    (if(string-contains?
        (number->string i)
        (number->string d))
       1 0 )))
</code>```

Testing:

```<code>(f 3 1 100)
(f 3 3 93)
(f 12 -200 200)
(f 123 1 3)
(f 3 33 34)
(f 0 -1 1)
</code>```

Output:

```<code>19
19
24
0
2
1
</code>```

Body:
Racket 91 bytes

(for/sum((i(range s(+ 1 e))))(if(string-contains?(number->string i)(number->string d))1 0))

Ungolfed:

(define(f d s e)
  (for/sum ((i (range s (+ 1 e))))
    (if(string-contains?
        (number->string i)
        (number->string d))
       1 0 )))

Testing:

(f 3 1 100)
(f 3 3 93)
(f 12 -200 200)
(f 123 1 3)
(f 3 33 34)
(f 0 -1 1)

Output:

19
19
24
0
2
1


问:
Wait... what was I going to say again?
I often forget what I wanted to say when the teacher calls on me to speak. Can you make me a tool to solve this?

Requirements:

The program must loop as follows:

First, take in input

If the input is empty, print the last stored question.

Otherwise, store the input as a question.

Notes:

The input will never be empty if there are no questions stored.

Clarification: The program does not need to store multiple questions. I originally wanted it to store multiple, but I changed it after many people misunderstood the question.

Remember, this is code-golf, so the code with the smallest number of bytes wins.

答:
Python3 - 49 bytes

```<code>s=""
while 1:
 b=input()
 if b:s=b
 else:print(s)
</code>```

Title: Wait... what was I going to say again?

Body:
Python3 - 49 bytes

s=""
while 1:
 b=input()
 if b:s=b
 else:print(s)


问:
Fibonacci reversed!

Introduction

We all know and love our Fibonacci sequence and have seen a myriad of challenge on it here already. However, we're still lacking a very simple case which this answer is going to provide: Reversed fibonacci! So given F_n your job is to find n.

Specification

Input

Your input will be a non-negative integer, which is guaranteed to be part of the fibonacci sequence.

Output

The output must be a non-negative integer as well.

What to do?

The introduction already said: Given a fibonacci number, output its index. Fiboancci number hereby is defined as F(0)=0, F(1)=1, F(n)=F(n-1)+F(n-2) and you're given F(n) and must return n.

Potential Corner Cases

0 is a valid in- and output.

If given "1" as input you may either output "1" or "2", as you prefer.

You may always assume that your input actually is a fibonacci number.

You may assume that the input is representable as a 32-bit signed integer.

Who wins?

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

Standard rules apply of course.

Test-cases

```<code>0 -> 0
2 -> 3
3 -> 4
5 -> 5
8 -> 6
13 -> 7
1836311903 -> 46
</code>```

答:
Java 8 61 bytes

Same as @dainichi answer only made shorter by using Java 8 lambdas. The answer is a valid rvalue expression.

```<code>n->{int a=0,b=1,c=0,t;while(a<n){c++;t=b;b+=a;a=t;}return c;}
</code>```

Ungolfed:

```<code>interface F
{
    int c(int n);
}

public class Main
{

    public static void main(String[] args)
    {
        F f = n->{int a=0,b=1,c=0,t;while(a<n){c++;t=b;b+=a;a=t;}return c;};
    }
}
</code>```

Title: Fibonacci reversed!

Body:
Java 8 61 bytes

Same as @dainichi answer only made shorter by using Java 8 lambdas. The answer is a valid rvalue expression.

n->{int a=0,b=1,c=0,t;while(a<n){c++;t=b;b+=a;a=t;}return c;}

Ungolfed:

interface F
{
    int c(int n);
}

public class Main
{

    public static void main(String[] args)
    {
        F f = n->{int a=0,b=1,c=0,t;while(a<n){c++;t=b;b+=a;a=t;}return c;};
    }
}


问:
Next Friday the 13th
What is the shortest program that can predict the next time Friday will fall on the 13th day of the month?

Must be an complete functioning program (not just a function/subroutine)

Must print out date in the following format: YYYY-MM-DD

Allow user to provide a start date either as a command line argument or through STDIN

If user provides no start date, use today as the start date.

If the start date is a Friday the 13th, the program should find the next Friday the 13th.

If I were to run the program today (Feb 16 2011) I should get the following output.

```<code>$ ./fr13th 2013-05-09
2013-09-13
$ ./fr13th 2007-06-29
2007-07-13
$ ./fr13th 2007-07-13
2008-06-13
$ ./fr13th
2011-05-13
</code>```

答:
D: 227 Characters

```<code>import std.datetime,std.stdio;void main(string[]a){auto d=a.length<2?cast(Date)(Clock.currTime()):Date.fromISOExtendedString(a[1]);for(;d.dayOfWeek!=DayOfWeek.fri||d.day!=13;d+=dur!"days"(1)){}writeln(d.toISOExtendedString());}
</code>```

More Legibly:

```<code>import std.datetime, std.stdio;

void main(string[] a)
{
    auto d = a.length < 2 ? cast(Date)(Clock.currTime()) : Date.fromISOExtendedString(a[1]);

    for(; d.dayOfWeek != DayOfWeek.fri || d.day != 13; d += dur!"days"(1)) {}

    writeln(d.toISOExtendedString());
}
</code>```

The fun part is that while D's std.datetime makes this sort of code very easy to write, it's also incredibly verbose - due primarily to the precise (and therefore long) function names. So, the usability and maintainability of the code is very high, but it's code golfability is rather low.

ContentLicense: CC BY-SA 2.5

Title: Next Friday the 13th

Body:
D: 227 Characters

import std.datetime,std.stdio;void main(string[]a){auto d=a.length<2?cast(Date)(Clock.currTime()):Date.fromISOExtendedString(a[1]);for(;d.dayOfWeek!=DayOfWeek.fri||d.day!=13;d+=dur!"days"(1)){}writeln(d.toISOExtendedString());}

More Legibly:

import std.datetime, std.stdio;

void main(string[] a)
{
    auto d = a.length < 2 ? cast(Date)(Clock.currTime()) : Date.fromISOExtendedString(a[1]);

    for(; d.dayOfWeek != DayOfWeek.fri || d.day != 13; d += dur!"days"(1)) {}

    writeln(d.toISOExtendedString());
}

The fun part is that while D's std.datetime makes this sort of code very easy to write, it's also incredibly verbose - due primarily to the precise (and therefore long) function names. So, the usability and maintainability of the code is very high, but it's code golfability is rather low.


问:
Fibonacci function or sequence
The Fibonacci sequence is a sequence of numbers, where every number in the sequence is the sum of the two numbers preceding it.  The first two numbers in the sequence are both 1. Here are the first few terms:

```<code>1 1 2 3 5 8 13 21 34 55 89 ...
</code>```

Write the shortest code that either:

Generates the Fibonacci sequence without end.

Given n calculates the nth term of the sequence. (Either 1 or zero indexed)

You may use standard forms of input and output.

(I gave both options in case one is easier to do in your chosen language than the other.)

For the function that takes an n, a reasonably large return value (the largest Fibonacci number that fits your computer's normal word size, at a minimum) has to be supported.

Leaderboard

/* Configuration */

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

/* App */

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

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

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

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

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

getAnswers();

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

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

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

function process() {
  var valid = [];

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

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

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

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

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

    var lang = a.language;
    lang = jQuery(''+lang+'').text();

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

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

  langs.sort(function (a, b) {
    if (a.lang_raw.toLowerCase() > b.lang_raw.toLowerCase()) return 1;
    if (a.lang_raw.toLowerCase() < b.lang_raw.toLowerCase()) return -1;
    return 0;
  });

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

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

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

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

table thead {
  font-weight: bold;
}

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

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

Shortest Solution by Language

Language	User	Score

Leaderboard

	Author	Language	Size

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

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

```

答:
Java 8 29 bytes

Using Java 8 lambdas. This is a valid statement if there exists a function interface with a method that returns an int and takes an int as a parameter. Also the variable that stores the lambda must be declared as a member (static or non static) of the class it is in so that it can be used recursively.

```<code>f=n->n<2?0:f.f(n-1)+f.f(n-2);
</code>```

Ungolfed:

```<code>@FunctionalInterface interface F
{
    int f(int n);
}

public class Main
{
    static F f;

    public static void main(String[] args)
    {
        f=n->n<2?0:f.f(n-1)+f.f(n-2);
    }
}
</code>```

ContentLicense: CC BY-SA 4.0

Title: Fibonacci function or sequence

Body:
Java 8 29 bytes

Using Java 8 lambdas. This is a valid statement if there exists a function interface with a method that returns an int and takes an int as a parameter. Also the variable that stores the lambda must be declared as a member (static or non static) of the class it is in so that it can be used recursively.

f=n->n<2?0:f.f(n-1)+f.f(n-2);

Ungolfed:

@FunctionalInterface interface F
{
    int f(int n);
}

public class Main
{
    static F f;

    public static void main(String[] args)
    {
        f=n->n<2?0:f.f(n-1)+f.f(n-2);
    }
}


答:
Actually, 21 bytes

```<code>"/\"5*SR6*;4α@R4α+3αi
</code>```

Try it online!

-1 byte from Adnan

Explanation:

```<code>"/\"5*SR6*;4α@R4α+3αi
"/\"5*                 "/\" repeated 5 times
      SR               sort and reverse (result: "\\\\\/////")
        6*             repeat string 6 times (forms one row)
          ;4α          copy and push a list containing 4 copies
             @R4α+     push a list containing 4 copies of the reversed string, append to previous list (now we have one row of diamonds)
                  3α   repeat pattern vertically 2 more times
                    i  flatten and implicitly print
</code>```

Title: This is my pillow

Body:
...will you help me immortalize it?

I've had this pillow a few years now, and apparently it's time to get rid of it. Can you please write a function or program, that I can bring with me and use to recreate this pillow whenever I want to reminisce a bit.

It must work with no input arguments.

The output should look exactly like this (trailing newlines and spaces are OK).

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

This is code golf, so the shortest code in bytes win!

Leaderboard

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

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

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

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

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

```

Body:
Actually, 21 bytes

"/\"5*SR6*;4α@R4α+3αi

Try it online!

-1 byte from Adnan

Explanation:

"/\"5*SR6*;4α@R4α+3αi
"/\"5*                 "/\" repeated 5 times
      SR               sort and reverse (result: "\\\\\/////")
        6*             repeat string 6 times (forms one row)
          ;4α          copy and push a list containing 4 copies
             @R4α+     push a list containing 4 copies of the reversed string, append to previous list (now we have one row of diamonds)
                  3α   repeat pattern vertically 2 more times
                    i  flatten and implicitly print


答:
05AB1E, <s>18</s> 15 bytes

Code:

```<code>„/\5×{4Å6×»6F=R
</code>```

Explanation:

```<code>„/\               # Push the string "/\"
   5×             # Repeat 5 times: "/\/\/\/\/\"
     {            # Sort, resulting in: "/////\\\\\"
      4Å6         # Create a list of 6's with length 4: [6, 6, 6, 6]
         ×        # Vectorized string multiplication
          »       # Join by newlines
           6F     # Do the following six times..
             =    #   Print with a newline without popping
              R   #   Reverse the string
</code>```

Uses the CP-1252 encoding. Try it online!

Title: This is my pillow

Body:
05AB1E, <s>18</s> 15 bytes

Code:

„/\5×{4Å6×»6F=R

Explanation:

„/\               # Push the string "/\"
   5×             # Repeat 5 times: "/\/\/\/\/\"
     {            # Sort, resulting in: "/////\\\\\"
      4Å6         # Create a list of 6's with length 4: [6, 6, 6, 6]
         ×        # Vectorized string multiplication
          »       # Join by newlines
           6F     # Do the following six times..
             =    #   Print with a newline without popping
              R   #   Reverse the string

Uses the CP-1252 encoding. Try it online!


答:
Jelly, <s>17</s> 16 bytes

```<code>⁾/\ẋ6Wẋ4;U$ẋ3x5Y
</code>```

Try it online!

Thanks to 6710 (miles) for -1 byte.

Title: This is my pillow

Body:
Jelly, <s>17</s> 16 bytes

⁾/\ẋ6Wẋ4;U$ẋ3x5Y

Try it online!

Thanks to 6710 (miles) for -1 byte.


答:
Python 2, <s>86</s> <s>80</s> <s>76</s> <s>74</s> 73 bytes

for z in range(24):a=('/'*5+'\\'*5)*24;print((a+a[::-1])*3)[z*60:z*60+60]
```

Could probably golf a few more off it but it's a start.

Edit

Saved 6 by removing some unneeded brackets

Another 4 by using a single string and then reversing it

Thanks @Adnan. Had a late night last night and still not fully awake yet :p

-1 by moving the *24 to the variable instead of using it twice

Title: This is my pillow

Body:
Python 2, <s>86</s> <s>80</s> <s>76</s> <s>74</s> 73 bytes

for z in range(24):a=('/'*5+'\\'*5)*24;print((a+a[::-1])*3)[z*60:z*60+60]

Could probably golf a few more off it but it's a start.

Edit

Saved 6 by removing some unneeded brackets

Another 4 by using a single string and then reversing it

Thanks @Adnan. Had a late night last night and still not fully awake yet :p

-1 by moving the *24 to the variable instead of using it twice


Title: This is my pillow

Body:
Python 2, 63 bytes

a='\n'.join([('/'*5+'\\'*5)*6]*4);print'\n'.join([a,a[::-1]]*3)

For Python 3, do this (65 bytes):

a='\n'.join([('/'*5+'\\'*5)*6]*4);print('\n'.join([a,a[::-1]]*3))


答:
///, 116 bytes

```<code>/a/\\\\\\\\\\\\\\\///b/\\\\\\\\\\\\\\\\//A/aaaaa//B/bbbbb//C/ABABABABABAB
//D/BABABABABABA
/CCCCDDDDCCCCDDDDCCCCDDDD
</code>```

Try it online!

Edit: the \\\\\\\\\\\\\\\/ and \\\\\\\\\\\\\\\\ are actually a single / and \, respectively.

Edit: -3 because I thought of removing i. I think this can't be further golfed.

Title: This is my pillow

Body:
///, 116 bytes

/a/\\\\\\\\\\\\\\\///b/\\\\\\\\\\\\\\\\//A/aaaaa//B/bbbbb//C/ABABABABABAB
//D/BABABABABABA
/CCCCDDDDCCCCDDDDCCCCDDDD

Try it online!

Edit: the \\\\\\\\\\\\\\\/ and \\\\\\\\\\\\\\\\ are actually a single / and \, respectively.

Edit: -3 because I thought of removing i. I think this can't be further golfed.


问:
Print a letter Fibonacci
Given N (2 <= N), print N lines of the letter Fibonacci series like this (i.e. N = 5)
First, start with a and b:

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

Next, add the two lines.

```<code>a
b
ab
</code>```

Keep adding the last two lines.

```<code>a
b
ab
bab
</code>```

Keep going...

```<code>a
b
ab
bab
abbab
</code>```

And we're done.

Remember, this is code-golf, so the code with the fewest bytes wins.

答:
SOML, 8 bytes

```<code> a b.{;t⁴+
</code>```

explanation:

```<code> a b.{;t⁴+                                        stack on 1st cycle
 a              push "a"                               ["a"]
   b            push "b"                               ["a","b"]
    .{          repeat input times                     ["a","b"]
      ;         swap the two top things on the stack   ["b","a"]
       t        output the top thing on the stack      ["b","a"]
        ⁴       copy the 2nd from top thing from stack ["b","a","b"]
         +      join them together                     ["b","ab"]
</code>```

This language is still in development and I did add a couple new functions while writing this.

Also, 1st post on PPCG!

Title: Print a letter Fibonacci

Body:
SOML, 8 bytes

 a b.{;t⁴+

explanation:

 a b.{;t⁴+                                        stack on 1st cycle
 a              push "a"                               ["a"]
   b            push "b"                               ["a","b"]
    .{          repeat input times                     ["a","b"]
      ;         swap the two top things on the stack   ["b","a"]
       t        output the top thing on the stack      ["b","a"]
        ⁴       copy the 2nd from top thing from stack ["b","a","b"]
         +      join them together                     ["b","ab"]

This language is still in development and I did add a couple new functions while writing this.

Also, 1st post on PPCG!


问:
Depalindromize this string!
Given a palindrome generated according to this challenge, depalindromize it.

Test cases

```<code>abcdedcba -> abcde
johncenanecnhoj -> johncena
ppapapp -> ppap
codegolflogedoc -> codegolf
</code>```

As this is about depalindromizing, your code cannot be a palindrome.

Remember, this is code-golf, so the code with the fewest bytes wins.

答:
Perl, 15 bytes

Includes +2 for -lp

Give input string on STDIN:

```<code>depal.pl <<< "HelleH"
</code>```

depal.pl:

```<code>#!/usr/bin/perl -lp
s/../chop/reg
</code>```

The -l is not really needed if you input the palindrome without final newline, but I included it to be fair to the other perl solutions that use it.

Title: Depalindromize this string!

Body:
Perl, 15 bytes

Includes +2 for -lp

Give input string on STDIN:

depal.pl <<< "HelleH"

depal.pl:

#!/usr/bin/perl -lp
s/../chop/reg

The -l is not really needed if you input the palindrome without final newline, but I included it to be fair to the other perl solutions that use it.


Title: This is my pillow

Body:
J, <s>31</s> <s>28</s> 19 bytes

4#_60]`|.\5#72$'/\'

Usage

   4#_60]`|.\5#72$'/\'
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////


答:
Brainfuck, 149 bytes

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

The best interpreter EVAR!

This uses 6 cells (no wrapping, no modulo). Here they are:

```<code>0A 00 2F 00 5C 00
</code>```

The 00 cells are used for the loop counters. Here, the counters are filled in with initial values:

```<code>0A 06 2F 04 5C 03
</code>```

The leftmost counter is for the innermost loop (yes, I use nested loops of depth 3). Please note that the 4th cell (04 counter) is used twice, once for /////\\\\\..., and once for \\\\\/////... every time.

0A, 2F and 5C are the characters \n, / and \, respectively.

Title: This is my pillow

Body:
Brainfuck, 149 bytes

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

The best interpreter EVAR!

This uses 6 cells (no wrapping, no modulo). Here they are:

0A 00 2F 00 5C 00

The 00 cells are used for the loop counters. Here, the counters are filled in with initial values:

0A 06 2F 04 5C 03

The leftmost counter is for the innermost loop (yes, I use nested loops of depth 3). Please note that the 4th cell (04 counter) is used twice, once for /////\\\\\..., and once for \\\\\/////... every time.

0A, 2F and 5C are the characters \n, / and \, respectively.


答:
SOML, 20 bytes

```<code> /5* \5*+6*6{4{t}5{«
</code>```

Explanation:

```<code> /                    push "/", stack: ["/"]
  5*                  repeat it 5 times ["/////"]
     \                push "\" ["/////","\"]
      5*              repeat it 5 times ["/////","\\\\\"]
        +             add together ["/////\\\\\"]
         6*           repeat the string 6 times (it gets long here)
           6{         6 times repeat following code
             4{t}     output 4 times
                 5{«  put the 1st 5 chars at the end of the string
</code>```

Title: This is my pillow

Body:
SOML, 20 bytes

 /5* \5*+6*6{4{t}5{«

Explanation:

 /                    push "/", stack: ["/"]
  5*                  repeat it 5 times ["/////"]
     \                push "\" ["/////","\"]
      5*              repeat it 5 times ["/////","\\\\\"]
        +             add together ["/////\\\\\"]
         6*           repeat the string 6 times (it gets long here)
           6{         6 times repeat following code
             4{t}     output 4 times
                 5{«  put the 1st 5 chars at the end of the string


答:
Octave, <s>50</s> 48 bytes

Anonymous function:

```<code>@()repmat([A=repmat(47,4,5) B=A*2-2;B A ''],3,6)
</code>```

You can try online here. Simply run the above command and then run the function with ans().

Essentially this creates an array of the value 47 which is 4 high and 5 wide. It then creates a second array of value 92 which is the same size.

The two arrays are concatenated into a checkerboard of [A B;B A]. The '' is concatenated as well to force conversion to character strings.

Finally the whole array is replicated 3 times down and 6 times across to form the final size.

Saved 2 bytes, thanks @StewieGriffin

Title: This is my pillow

Body:
Octave, <s>50</s> 48 bytes

Anonymous function:

@()repmat([A=repmat(47,4,5) B=A*2-2;B A ''],3,6)

You can try online here. Simply run the above command and then run the function with ans().

Essentially this creates an array of the value 47 which is 4 high and 5 wide. It then creates a second array of value 92 which is the same size.

The two arrays are concatenated into a checkerboard of [A B;B A]. The '' is concatenated as well to force conversion to character strings.

Finally the whole array is replicated 3 times down and 6 times across to form the final size.

Saved 2 bytes, thanks @StewieGriffin


Title: This is my pillow

Body:
Haskell, <s>77</s> <s>70</s> 57 bytes

a%b=(<*[1..a]).([1..b]>>)
unlines$4%3$5%6<$>["/\\","\\/"]

Boring concats and replicates instead of playing with sines. Old was:

unlines[["\\/"!!(ceiling$sin(pi*x/5)*sin(pi*y/4))|x<-[0.5..59]]|y<-[0.5..23]]


答:
Self-modifying Brainfuck, 91 bytes

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

Try it online!

Same as my brainfuck answer, but uses the 3 last characters of the source code instead of generating them at runtime.

Title: This is my pillow

Body:
Self-modifying Brainfuck, 91 bytes

>>+++[<++++[<++++++[<.....<.....>>-]<<<.>>>>-]++++[<++++++[<<.....>.....>-]<<<.>>>>-]>-]
\/

Try it online!

Same as my brainfuck answer, but uses the 3 last characters of the source code instead of generating them at runtime.


答:
Python 2, 49 bytes

b,a='\/';exec("print(a*5+b*5)*6;"*4+"a,b=b,a;")*6
```

<p>Thanks to Mitch Schwartz for this clean method that saves a byte. The idea is to print four lines of <code>('\\'*5+'/'*5)*6</code>, swap the roles of slash and backslash, and then do that whole process 6 times. The two characters are stored in <code>a</code> and <code>b</code>, and swapped as <code>a,b=b,a</code>. The double-loop is double by generating the following code string, then executing it with <code>exec</code>:</p>

<pre class="lang-python prettyprint-override"><code>print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;a,b=b,a;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;a,b=b,a;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;a,b=b,a;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;a,b=b,a;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;a,b=b,a;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;a,b=b,a;
</code>```

50 bytes:

s='/'*5+'\\'*5;exec("print s*6;"*4+"s=s[::-1];")*6
```

<p>Makes the line string, prints it four times and then reverses it, then does that 6 times. Does so by generating the following code, then executing it:</p>

<pre class="lang-python prettyprint-override"><code>print s*6;print s*6;print s*6;print s*6;s=s[::-1];print s*6;print s*6;print s*6;print s*6;s=s[::-1];print s*6;print s*6;print s*6;print s*6;s=s[::-1];print s*6;print s*6;print s*6;print s*6;s=s[::-1];print s*6;print s*6;print s*6;print s*6;s=s[::-1];print s*6;print s*6;print s*6;print s*6;s=s[::-1]
</code>```

Here are some of the iterations of my golfing:

for c in([1]*4+[-1]*4)*3:print('/'*5+'\\'*5)[::c]*6

for i in range(24):print('/\\'*5+'\/'*5)[i/4%2::2]*6

for c in range(24):print('\\'*5+'/'*5)[::(c&4)/2-1]*6

for i in range(24):print('/'*5+'\\'*5)[::1-i/4%2*2]*6

for c in([1]*4+[0]*4)*3:print('\/'*5+'/\\'*5)[c::2]*6

for c in([1]*4+[0]*4)*3:print('\/'[c]*5+'/\\'[c]*5)*6

for c in(['/\\']*4+['\/']*4)*3:print(c[0]*5+c[1]*5)*6

for c in([5]*4+[-5]*4)*3:print('/'*c+'\\'*5+'/'*-c)*6

print((('/'*5+'\\'*5)*6+'\n')*4+(('\\'*5+'/'*5)*6+'\n')*4)*3

for x in(['/'*5+'\\'*5]*4+['\\'*5+'/'*5]*4)*3:print x*6

a='/'*5;b='\\'*5
for x in([a+b]*4+[b+a]*4)*3:print x*6

s='/'*5+'\\'*5
for x in([s]*4+[s[::-1]]*4)*3:print x*6

s=('/'*5+'\\'*5)*9
exec("print s[:60];"*4+"s=s[5:];")*6

a='/'*5;b='\\'*5
for i in range(24):print[a+b,b+a][i/4%2]*6
```

Title: This is my pillow

Body:
Python 2, 49 bytes

b,a='\/';exec("print(a*5+b*5)*6;"*4+"a,b=b,a;")*6

Thanks to Mitch Schwartz for this clean method that saves a byte. The idea is to print four lines of ('\\'*5+'/'*5)*6, swap the roles of slash and backslash, and then do that whole process 6 times. The two characters are stored in a and b, and swapped as a,b=b,a. The double-loop is double by generating the following code string, then executing it with exec:

print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;a,b=b,a;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;a,b=b,a;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;a,b=b,a;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;a,b=b,a;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;a,b=b,a;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;print(a*5+b*5)*6;a,b=b,a;

50 bytes:

s='/'*5+'\\'*5;exec("print s*6;"*4+"s=s[::-1];")*6

Makes the line string, prints it four times and then reverses it, then does that 6 times. Does so by generating the following code, then executing it:

print s*6;print s*6;print s*6;print s*6;s=s[::-1];print s*6;print s*6;print s*6;print s*6;s=s[::-1];print s*6;print s*6;print s*6;print s*6;s=s[::-1];print s*6;print s*6;print s*6;print s*6;s=s[::-1];print s*6;print s*6;print s*6;print s*6;s=s[::-1];print s*6;print s*6;print s*6;print s*6;s=s[::-1]

Here are some of the iterations of my golfing:

for c in([1]*4+[-1]*4)*3:print('/'*5+'\\'*5)[::c]*6

for i in range(24):print('/\\'*5+'\/'*5)[i/4%2::2]*6

for c in range(24):print('\\'*5+'/'*5)[::(c&4)/2-1]*6

for i in range(24):print('/'*5+'\\'*5)[::1-i/4%2*2]*6

for c in([1]*4+[0]*4)*3:print('\/'*5+'/\\'*5)[c::2]*6

for c in([1]*4+[0]*4)*3:print('\/'[c]*5+'/\\'[c]*5)*6

for c in(['/\\']*4+['\/']*4)*3:print(c[0]*5+c[1]*5)*6

for c in([5]*4+[-5]*4)*3:print('/'*c+'\\'*5+'/'*-c)*6

print((('/'*5+'\\'*5)*6+'\n')*4+(('\\'*5+'/'*5)*6+'\n')*4)*3

for x in(['/'*5+'\\'*5]*4+['\\'*5+'/'*5]*4)*3:print x*6

a='/'*5;b='\\'*5
for x in([a+b]*4+[b+a]*4)*3:print x*6

s='/'*5+'\\'*5
for x in([s]*4+[s[::-1]]*4)*3:print x*6

s=('/'*5+'\\'*5)*9
exec("print s[:60];"*4+"s=s[5:];")*6

a='/'*5;b='\\'*5
for i in range(24):print[a+b,b+a][i/4%2]*6


答:
Pyke, 6 bytes

```<code>z=z~zr
</code>```

Try it here!

```<code>     r - while 1:
z      -   input() or z.contents
 =z    -  z.contents = ^
   ~z  -  z.contents
</code>```

Title: Wait... what was I going to say again?

Body:
I often forget what I wanted to say when the teacher calls on me to speak. Can you make me a tool to solve this?

Requirements:

The program must loop as follows:

First, take in input

If the input is empty, print the last stored question.

Otherwise, store the input as a question.

Notes:

The input will never be empty if there are no questions stored.

Clarification: The program does not need to store multiple questions. I originally wanted it to store multiple, but I changed it after many people misunderstood the question.

Remember, this is code-golf, so the code with the smallest number of bytes wins.

Body:
Pyke, 6 bytes

z=z~zr

Try it here!

     r - while 1:
z      -   input() or z.contents
 =z    -  z.contents = ^
   ~z  -  z.contents


答:
C#, 26 bytes

s=>s.Remove(s.Length/2+1);
```

This removes the end of the string.

Title: Depalindromize this string!

Body:
Given a palindrome generated according to this challenge, depalindromize it.

Test cases

```<code>abcdedcba -> abcde
johncenanecnhoj -> johncena
ppapapp -> ppap
codegolflogedoc -> codegolf
</code>```

As this is about depalindromizing, your code cannot be a palindrome.

Remember, this is code-golf, so the code with the fewest bytes wins.

Body:
C#, 26 bytes

s=>s.Remove(s.Length/2+1);

This removes the end of the string.


答:
Pyke, 16 bytes

```<code>"/\"6*5m*n+4*sD3
</code>```

After update today that allowed " in string literals, 17 bytes

```<code>"/\\"6*5m*n+4*sD3
</code>```

Try it here!

Title: This is my pillow

Body:
...will you help me immortalize it?

I've had this pillow a few years now, and apparently it's time to get rid of it. Can you please write a function or program, that I can bring with me and use to recreate this pillow whenever I want to reminisce a bit.

It must work with no input arguments.

The output should look exactly like this (trailing newlines and spaces are OK).

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

This is code golf, so the shortest code in bytes win!

Leaderboard

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

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

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

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

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

```

Body:
Pyke, 16 bytes

"/\"6*5m*n+4*sD3

After update today that allowed " in string literals, 17 bytes

"/\\"6*5m*n+4*sD3

Try it here!


Title: This is my pillow

Body:
PHP, <s>73</s> 69 bytes

for($s='/\\';$i<1440;$i++)echo$i%60<1?'
':'',$s[($i/5+($i/240|0))%2];

Demo

http://ideone.com/z7N1Md


答:
JavaScript (ES6), <s>68</s> <s>60</s> 58 bytes

A recursive function. Several optimizations inspired from chocochaos answer.

f=(n=1440)=>n--?'/\\'[n/240&1^n/5&1]+(n%60?'':`
`)+f(n):''
```

<h3>Demo</h3>

<p><div class="snippet" data-lang="js" data-hide="true" data-console="true" data-babel="false">
<div class="snippet-code snippet-currently-hidden">
<pre class="snippet-code-js lang-js prettyprint-override"><code>f=(n=1440)=>n--?'/\\'[n/240&1^n/5&1]+(n%60?'':`
`)+f(n):''

console.log(f());</code>```

Title: This is my pillow

Body:
JavaScript (ES6), <s>68</s> <s>60</s> 58 bytes

A recursive function. Several optimizations inspired from chocochaos answer.

f=(n=1440)=>n--?'/\\'[n/240&1^n/5&1]+(n%60?'':`
`)+f(n):''

Demo

f=(n=1440)=>n--?'/\\'[n/240&1^n/5&1]+(n%60?'':`
`)+f(n):''

console.log(f());


答:
Python 3, 34 bytes

```<code>s=""
while[print(s)]:s=input()or s
</code>```

Title: Wait... what was I going to say again?

Body:
Python 3, 34 bytes

s=""
while[print(s)]:s=input()or s


答:
Brainfuck, 20 bytes

```<code>,
[
  [>,]
  <[<]
  >.,>[>]
  <<
]
</code>```

Try it online.

This saves a byte over the more straightforward approach of consuming the input before starting the main loop:

```<code>,[>,]
<
[
  [<]
  >.,>[>]
  <,<
]
</code>```

Title: Depalindromize this string!

Body:
Brainfuck, 20 bytes

,
[
  [>,]
  <[<]
  >.,>[>]
  <<
]

Try it online.

This saves a byte over the more straightforward approach of consuming the input before starting the main loop:

,[>,]
<
[
  [<]
  >.,>[>]
  <,<
]


问:
Decode Baby-talk!
When babies open their mouths, they're not just spewing gibberish. They're actually talking in a highly advanced, adult-proof cipher...

The Baby-talk Cipher

When a baby talks, it could look something like gogooa gagooook aagaaoooy
Each single-space separated section represents a character (so the example above represents 3 characters).

To decipher a section, we must count number of As and Os it contains. However, we only count those which are adjacent to another vowel. For example, the A in 'gag' would not count, but both the A and O in 'gaog' would.

Counting the example above would look like this:

```<code>Section    | Num Os | Num As

gogooa     | 2      | 1
gagooook   | 4      | 0
aagaaoooy  | 3      | 4
</code>```

We then use these values to convert the input into plaintext on a Polybius square. This is a 5x5 representation of the English alphabet, omitting 'J' (please note that, in baby-talk, 0-counting rules apply to the table):

```<code>  0 1 2 3 4
0 A B C D E
1 F G H I K
2 L M N O P
3 Q R S T U
4 V W X Y Z
</code>```

Using the number of Os as the column, and number of As as the row, we find which character each section represents:

```<code>Section    | Num Os | Num As | Character

gogooa     | 2      | 1      | (2,1) -> H
gagooook   | 4      | 0      | (4,0) -> E
aagaaoooy  | 3      | 4      | (3,4) -> Y
</code>```

Which tells us that the baby was just saying "HEY".

Notes:

- If a section representing a character has more than 4 As or Os, ignore the extras, because 4 is the maximum value on the table.
- For this task, Y is not a vowel - only A, E, I, O and U.

The Challenge

Your task is to create a full program which takes one input, a word in baby-speak, and prints it in plaintext.

Your program must be able to take input in uppercase, lowercase, and a mix of both.

The input will only contain ASCII alphabet letters (A-Z and a-z), with single spaces to seperate the baby words.

The output text can be in any case.

You should the take the input from STDIN and print the plaintext on STDOUT. If your language does not have these, use the nearest equivalent.

This is code-golf, so the shortest code in bytes wins - but any solution is welcome.

Test Cases

```<code>'GLOOG KAKAAOOO ARGOOO OOOOOGUGUU' -> CODE
'oaka pooopaa gaau augu' -> GOLF
'Aoao U oOOAoa oaoAoo aoAoAOa' -> NAPPY
'GUG gAGaA gOougOou' -> ALE
'OOaGOG GoGOOoGoU gAA bLAA GOUGoOUgAIGAI' -> HELLO
</code>```

答:
05AB1E, 46 bytes

```<code>lð¡vyžNvyð:}ð¡D€g1›ÏJ©'a¢4‚W5*®'o¢4‚Ws\+A'j-è?
</code>```

Try it online!

Explanation in steps

split on spaces to form words

replace konsonants in words with spaces

split words on spaces to form groups of vowels

remove vowel groups with a length shorter than 2

get min of count(a) and 4, multiply by 5

get min of count(o) and 4

add counts

get letter at that index of alphabet (excluding "j")

Title: Decode Baby-talk!

Body:
05AB1E, 46 bytes

lð¡vyžNvyð:}ð¡D€g1›ÏJ©'a¢4‚W5*®'o¢4‚Ws\+A'j-è?

Try it online!

Explanation in steps

split on spaces to form words

replace konsonants in words with spaces

split words on spaces to form groups of vowels

remove vowel groups with a length shorter than 2

get min of count(a) and 4, multiply by 5

get min of count(o) and 4

add counts

get letter at that index of alphabet (excluding "j")


问:
Primenary Strings

A Primenary (binary-prime) string is one which, when written as a binary grid, every row and column has a prime total.

That's quite a vague explanation, so let's break it down with a worked example...

For this example we'll use the string bunny:

First, find the ASCII code point of each character and its binary representation:

```<code>Char | ASCII | Binary

b      98      1100010
u      117     1110101
n      110     1101110
n      110     1101110
y      121     1111001
</code>```

Take these binary values, from top to bottom, and arrange them into grid (adding leading zeros if necessary):

```<code>1 1 0 0 0 1 0
1 1 1 0 1 0 1
1 1 0 1 1 1 0
1 1 0 1 1 1 0
1 1 1 1 0 0 1
</code>```

Then, count the number of 1s in each row and column:

```<code>1 1 0 0 0 1 0   > 3
1 1 1 0 1 0 1   > 5
1 1 0 1 1 1 0   > 5
1 1 0 1 1 1 0   > 5
1 1 1 1 0 0 1   > 5

v v v v v v v

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

If, and only if, every single total is prime (such as here) then the string is a valid binary-prime.

The Challenge

Your task is to create a function or program which, when given a string, returns/outputs truthy if the string is primenary, and falsy otherwise.

Rules/Details

You may assume that the string's characters will always be in the ASCII range 33-126 (inclusive).

The string will not be empty.

A primenary string does not have to have a prime length - for example, W1n* is valid, despite having 4 characters.

This is code-golf, so the shortest answer (in bytes) wins - but all submissions are welcome.

Standard loopholes are banned.

Test Cases

```<code>'husband'     -> True
'HOTJava'     -> True
'COmPaTIBILE' -> True
'AuT0HACk'    -> True

'PPCW'        -> False
'code-golf'   -> False
'C++'         -> False
'/kD'         -> False

'HI'          -> False
'A'           -> False
</code>```

There is also a working, but incredibly verbose Python example on repl.it that you can test your solution against.

答:
05AB1E, 17 bytes

```<code>Çžz+b€¦€SDøìO0ÛpP
</code>```

Try it online!

Title: Primenary Strings

Body:
05AB1E, 17 bytes

Çžz+b€¦€SDøìO0ÛpP

Try it online!


Title: This is my pillow

Body:
Dyalog APL, 24 bytes

(60⍴5/0 4)⊖60/⍪∊3⍴⊂4/'/\'


Title: This is my pillow

Body:
Ruby, 46 bytes

Creates the following string (70 characters, one set more than needed) then alternates between sampling characters 0..59 and 5..64from it.

/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\

code and output

24.times{|i|puts ((?/*5+?\\*5)*7)[i/4%2*5,60]}

/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////

interesting mistake (a 7 instead of a 5)

24.times{|i|puts ((?/*5+?\\*5)*7)[i/4%2*7,60]}

/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\
\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\
\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\
\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\
\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\
\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\
\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\
\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\
\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\
\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\


Title: This is my pillow

Body:
Bubblegum, 30 bytes

00000000: d307 8118 1020 9dc5 3544 3523 f8a4 b386  ..... ..5D5#....
00000010: aae6 e113 cfa3 f13c 1acf a3f1 0c00       .......<......

Obligatory Bubblegum answer.


答:
Pyth, <s>49</s> <s>48</s> <s>40</s> <s>37</s> 34 bytes

```<code>J60K*24+*5\/*5\\V24:*3+K_K*JN+J*JN
</code>```

OK, I'm just learning Pyth so this is a direct port of my Python answer. Still a lot of golfing to do but it works so I am posting it anyway. Any hints gratefully received :)

1 byte saved with thanks to @Flp.Tkc

-8 by working out how to do it with a variable

-3 by moving the *24 to the assignment of K

-3 by getting rid of the quotes

Title: This is my pillow

Body:
Pyth, <s>49</s> <s>48</s> <s>40</s> <s>37</s> 34 bytes

J60K*24+*5\/*5\\V24:*3+K_K*JN+J*JN

OK, I'm just learning Pyth so this is a direct port of my Python answer. Still a lot of golfing to do but it works so I am posting it anyway. Any hints gratefully received :)

1 byte saved with thanks to @Flp.Tkc

-8 by working out how to do it with a variable

-3 by moving the *24 to the assignment of K

-3 by getting rid of the quotes


问:
Count trailing truths

Inspired by, and in memory of, my dear friend and colleague,

Dan Baronet, 1956 – 2016. R.I.P.

He found the shortest possible APL solution to this task:

Task

Given a Boolean list, count the number of trailing truth values.

Example cases

{} → 0

{0} → 0

{1} → 1

{0, 1, 1, 0, 0} → 0

{1, 1, 1, 0, 1} → 1

{1, 1, 0, 1, 1} → 2

{0, 0, 1, 1, 1} → 3

{1, 1, 1, 1, 1, 1} → 6

答:
Haskell, <s>26</s> 25 bytes

a%b|b=1+a|0<3=0
foldl(%)0
```
<p>Usage:</p>
<pre class="lang-haskell prettyprint-override"><code>Prelude> foldl(%)0 [True,False,True,True]
2
</code>```

Pointfree version (26 bytes):

length.fst.span id.reverse
```
<hr />
<p>Using an integer list instead of a bool list (21 bytes, thanks to Christian Sievers):</p>
<pre class="lang-haskell prettyprint-override"><code>a%b=b*(a+1)
foldl(%)0
</code>```

Usage:

Prelude> foldl(%)0 [1,0,1,1]
2
```
<p>Pointfree version (25 bytes)</p>
<pre class="lang-haskell prettyprint-override"><code>sum.fst.span(==1).reverse
</code>```

Title: Count trailing truths

Body:
Haskell, <s>26</s> 25 bytes

a%b|b=1+a|0<3=0
foldl(%)0

Usage:

Prelude> foldl(%)0 [True,False,True,True]
2

Pointfree version (26 bytes):

length.fst.span id.reverse

Using an integer list instead of a bool list (21 bytes, thanks to Christian Sievers):

a%b=b*(a+1)
foldl(%)0

Usage:

Prelude> foldl(%)0 [1,0,1,1]
2

Pointfree version (25 bytes)

sum.fst.span(==1).reverse


答:
Perl, <s>36</s> 35 bytes

Includes +3 for -n

Give count on STDIN

```<code>perl -M5.010 fibo.pl <<< 5
</code>```

fibo.pl

```<code>#!/usr/bin/perl -n
$_=$'.s/1//.$_,say$`for(a1.b)x$_
</code>```

Title: Print a letter Fibonacci

Body:
Given N (2 <= N), print N lines of the letter Fibonacci series like this (i.e. N = 5)
First, start with a and b:

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

Next, add the two lines.

```<code>a
b
ab
</code>```

Keep adding the last two lines.

```<code>a
b
ab
bab
</code>```

Keep going...

```<code>a
b
ab
bab
abbab
</code>```

And we're done.

Remember, this is code-golf, so the code with the fewest bytes wins.

Body:
Perl, <s>36</s> 35 bytes

Includes +3 for -n

Give count on STDIN

perl -M5.010 fibo.pl <<< 5

fibo.pl

#!/usr/bin/perl -n
$_=$'.s/1//.$_,say$`for(a1.b)x$_


答:
05AB1E, <s>12</s> <s>10</s> <s>6</s> 5 bytes

Saved 1 byte thanks to carusocomputing.

```<code>Î0¡¤g
</code>```

Try it online!

Explanation

```<code>Î      # push 0 and input
 0¡    # split on 0
   ¤   # take last item in list
    g  # get length
</code>```

Title: Count trailing truths

Body:
Inspired by, and in memory of, my dear friend and colleague,

Dan Baronet, 1956 – 2016. R.I.P.

He found the shortest possible APL solution to this task:

Task

Given a Boolean list, count the number of trailing truth values.

Example cases

{} → 0

{0} → 0

{1} → 1

{0, 1, 1, 0, 0} → 0

{1, 1, 1, 0, 1} → 1

{1, 1, 0, 1, 1} → 2

{0, 0, 1, 1, 1} → 3

{1, 1, 1, 1, 1, 1} → 6

Body:
05AB1E, <s>12</s> <s>10</s> <s>6</s> 5 bytes

Saved 1 byte thanks to carusocomputing.

Î0¡¤g

Try it online!

Explanation

Î      # push 0 and input
 0¡    # split on 0
   ¤   # take last item in list
    g  # get length


答:
Jelly, 4 bytes

```<code>ŒrṪP
</code>```

Try it online! or Verify all test cases.

For the case where the list is empty, there are some curious observations. First, run-length encoding the empty list [] returns another empty list []. Then retreiving the last element from that using tail Ṫ returns 0 instead of a pair [value, count] which are the regular elements of a run-length encoded array. Then product P returns 0 when called on 0 which is the expected result.

Explanation

```<code>ŒrṪP  Main link. Input: list M
Œr    Run-length encode
  Ṫ   Tail, get the last value
   P  Product, multiply the values together
</code>```

Title: Count trailing truths

Body:
Jelly, 4 bytes

ŒrṪP

Try it online! or Verify all test cases.

For the case where the list is empty, there are some curious observations. First, run-length encoding the empty list [] returns another empty list []. Then retreiving the last element from that using tail Ṫ returns 0 instead of a pair [value, count] which are the regular elements of a run-length encoded array. Then product P returns 0 when called on 0 which is the expected result.

Explanation

ŒrṪP  Main link. Input: list M
Œr    Run-length encode
  Ṫ   Tail, get the last value
   P  Product, multiply the values together


答:
C#, 126 Bytes

```<code>var s="";var c="/";for(int a=0;a<24;){for(int b=0;b<60;)s+=b++%5>0?c:c=="/"?c=@"\":c="/";s+="\n";c=a++%3>1?c=="/"?@"\":"/":c;}
</code>```

string s is output.
It could be 3 byte less, when it is infinite.

Ungolfed

```<code>        var s = "";
        var c = "/";
        for (int a = 0; a < 24;)
        {
            for (int b = 0; b < 60;)//write line
            {
                s += b++ % 5 > 0 ? c : c == "/" ? c = @"\" : c = "/";//Change  /to \ and vice versa after five times
            }
            s += "\n";

            c = a++ % 3 > 1 ? c == "/"? c = @"\" : c = "/" :c; //Change  /to \ and vice versa after three lines
        }
</code>```

Title: This is my pillow

Body:
...will you help me immortalize it?

I've had this pillow a few years now, and apparently it's time to get rid of it. Can you please write a function or program, that I can bring with me and use to recreate this pillow whenever I want to reminisce a bit.

It must work with no input arguments.

The output should look exactly like this (trailing newlines and spaces are OK).

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

This is code golf, so the shortest code in bytes win!

Leaderboard

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

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

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

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

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

```

Body:
C#, 126 Bytes

var s="";var c="/";for(int a=0;a<24;){for(int b=0;b<60;)s+=b++%5>0?c:c=="/"?c=@"\":c="/";s+="\n";c=a++%3>1?c=="/"?@"\":"/":c;}

string s is output.
It could be 3 byte less, when it is infinite.

Ungolfed

        var s = "";
        var c = "/";
        for (int a = 0; a < 24;)
        {
            for (int b = 0; b < 60;)//write line
            {
                s += b++ % 5 > 0 ? c : c == "/" ? c = @"\" : c = "/";//Change  /to \ and vice versa after five times
            }
            s += "\n";

            c = a++ % 3 > 1 ? c == "/"? c = @"\" : c = "/" :c; //Change  /to \ and vice versa after three lines
        }


答:
Pyke, <s>10</s> 6 bytes

```<code>_0+0R@
</code>```

Try it here!

Title: Count trailing truths

Body:
Pyke, <s>10</s> 6 bytes

_0+0R@

Try it here!


答:
C, <s>66</s> 61 bytes

5 bytes saved thanks to orlp.

Straightforward character by character printing. 61 characters per row, last is newline (ASCII 10) and the others alternate between /47 and \ 92.

```<code>i;f(){for(i=1463;i;)putchar(i--%61?i%61/5+i/244&1?92:47:10);}

//call like this
main(){f();}
</code>```

Title: This is my pillow

Body:
C, <s>66</s> 61 bytes

5 bytes saved thanks to orlp.

Straightforward character by character printing. 61 characters per row, last is newline (ASCII 10) and the others alternate between /47 and \ 92.

i;f(){for(i=1463;i;)putchar(i--%61?i%61/5+i/244&1?92:47:10);}

//call like this
main(){f();}


答:
Mathematica, 44 bytes

```<code>If[(b=InputString[])=="",Print@a,a=b]~Do~∞
</code>```

Full program. The Unicode character is U+221E INFINITY for \[Infinity].

Title: Wait... what was I going to say again?

Body:
I often forget what I wanted to say when the teacher calls on me to speak. Can you make me a tool to solve this?

Requirements:

The program must loop as follows:

First, take in input

If the input is empty, print the last stored question.

Otherwise, store the input as a question.

Notes:

The input will never be empty if there are no questions stored.

Clarification: The program does not need to store multiple questions. I originally wanted it to store multiple, but I changed it after many people misunderstood the question.

Remember, this is code-golf, so the code with the smallest number of bytes wins.

Body:
Mathematica, 44 bytes

If[(b=InputString[])=="",Print@a,a=b]~Do~∞

Full program. The Unicode character is U+221E INFINITY for \[Infinity].


答:
CMD, 37 bytes

Sadly set does not take empty input:(

```<code>set/p a=
if %a%.=. echo b
set b=%a%
c
</code>```

in a file names c.cmd or

```<code>set/p a=
if %a%.=. echo b
set b=%a%
%0
</code>```

in any file. Working(Use - as empty):

```<code>set/p a=
if %a%.=-. echo b
set b=%a%
c
</code>```

Title: Wait... what was I going to say again?

Body:
CMD, 37 bytes

Sadly set does not take empty input:(

set/p a=
if %a%.=. echo b
set b=%a%
c

in a file names c.cmd or

set/p a=
if %a%.=. echo b
set b=%a%
%0

in any file. Working(Use - as empty):

set/p a=
if %a%.=-. echo b
set b=%a%
c


答:
Pyth, 6 bytes

```<code>x_+0Q0
</code>```

Try it here!

Appends a 0, reverses and finds the index of the first 0

Title: Count trailing truths

Body:
Pyth, 6 bytes

x_+0Q0

Try it here!

Appends a 0, reverses and finds the index of the first 0


答:
Brachylog, <s>7</s> <s>6</s> 5 bytes

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

Try it online!

Explanation

```<code>@]        A suffix of the Input...
  #=      ...whose elements are all equal
    +     Sum its elements
</code>```

Since @] - Suffix starts from the biggest suffix all the way up to the smallest one, it will find the longest run first.

Title: Count trailing truths

Body:
Brachylog, <s>7</s> <s>6</s> 5 bytes

@]#=+

Try it online!

Explanation

@]        A suffix of the Input...
  #=      ...whose elements are all equal
    +     Sum its elements

Since @] - Suffix starts from the biggest suffix all the way up to the smallest one, it will find the longest run first.


答:
JavaScript (ES6), 21 bytes

f=l=>l.pop()?f(l)+1:0
```

<h3>Test cases</h3>

<p><div class="snippet" data-lang="js" data-hide="true" data-console="true" data-babel="false">
<div class="snippet-code snippet-currently-hidden">
<pre class="snippet-code-js lang-js prettyprint-override"><code>f=l=>l.pop()?f(l)+1:0

console.log(f([])); // → 0
console.log(f([0])); // → 0
console.log(f([1])); // → 1
console.log(f([0, 1, 1, 0, 0])); // → 0
console.log(f([1, 1, 1, 0, 1])); // → 1
console.log(f([1, 1, 0, 1, 1])); // → 2
console.log(f([0, 0, 1, 1, 1])); // → 3
console.log(f([1, 1, 1, 1, 1, 1])); // → 6</code>```

Title: Count trailing truths

Body:
JavaScript (ES6), 21 bytes

f=l=>l.pop()?f(l)+1:0

Test cases

f=l=>l.pop()?f(l)+1:0

console.log(f([])); // → 0
console.log(f([0])); // → 0
console.log(f([1])); // → 1
console.log(f([0, 1, 1, 0, 0])); // → 0
console.log(f([1, 1, 1, 0, 1])); // → 1
console.log(f([1, 1, 0, 1, 1])); // → 2
console.log(f([0, 0, 1, 1, 1])); // → 3
console.log(f([1, 1, 1, 1, 1, 1])); // → 6


Title: Count trailing truths

Body:
Mathematica, <s>25</s> 24 bytes

Fold[If[#2,#+1,0]&,0,#]&


答:
CJam (8 bytes)

```<code>{W%0+0#}
</code>```

Online test suite

Dissection

```<code>{    e# begin a block
  W%  e# reverse the array
  0+  e# append 0 so there's something to find
  0#  e# find index of first 0, which is number of nonzeros before it
}
</code>```

Title: Count trailing truths

Body:
CJam (8 bytes)

{W%0+0#}

<a href="http://cjam.aditsu.net/#code=qN%2F%7B'%E2%86%92%2F0%3D'%2C-~~%5D%0A%0A%7BW%250%2B0%23%7D%0A%0A~p%7D%2F&input=%7B%7D%20%E2%86%92%200%0A%7B0%7D%20%E2%86%92%200%0A%7B1%7D%20%E2%86%92%201%0A%7B0%2C%201%2C%201%2C%200%2C%200%7D%20%E2%86%92%200%0A%7B1%2C%201%2C%201%2C%200%2C%201%7D%20%E2%86%92%201%0A%7B1%2C%201%2C%200%2C%201%2C%201%7D%20%E2%86%92%202%0A%7B0%2C%200%2C%201%2C%201%2C%201%7D%20%E2%86%92%203%0A%7B1%2C%201%2C%201%2C%201%2C%201%2C%201%7D%20%E2%86%92%206" rel="nofollow noreferrer">Online test suite

Dissection

{    e# begin a block
  W%  e# reverse the array
  0+  e# append 0 so there's something to find
  0#  e# find index of first 0, which is number of nonzeros before it
}


问:
Print the ASCII table
The task is to display n characters of the ASCII table.

You may write a function (or a program that takes the argument as a parameter, STDIN is allowed as well) that takes a parameter n, which will be the index of the last character to print.

The task is quite simple, so as an example here's a possible implementation in Python 2.7:

```<code>(lambda n:map(chr, range(n)))(256)
</code>```

As I said it's a simple task. So this is code-golf and the shortest codes wins!

EDIT

As some of you pointed out this code doesn't print the result. It's just an example since I might struggle explaining the problem in english ;-).

EDIT2

Feel free to post the answer in any programming language, even if it's not the shortest code. Maybe there are some interesting implementations out there!

EDIT3

Fixed the example so it prints the result.

答:
BrainFuck - 140 112 Bytes

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

Try It Here!

Saved 28 bytes by changing [<<<->>>->+<]>[<<<->>>->+<]>[<<<->>>-] to [<<<->->->-].

What it does

```<code>,>,>,>                                                              Takes three inputs
                                                                    in three separate cells

-[>+<-----]>---[<+>-]<[<<<->->->-]<                                 Takes 48 off of each to
                                                                    convert them to decimal

[>+<-]<[>>++++++++++<<-]<[>>>>++++++++++[<++++++++++>-]<<<<-]>>>    Combines them into a
                                                                    three digit number by
                                                                    multiplying the first
                                                                    by 100, the second by
                                                                    10 and then adding all
                                                                    three

[>.+<-]                                                             Repeatedly prints the
                                                                    value of the adjacent
                                                                    cell and then adds one
                                                                    to it until it reaches
                                                                    the input value.
</code>```

Title: Print the ASCII table

Body:
BrainFuck - 140 112 Bytes

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

Try It Here!

Saved 28 bytes by changing [<<<->>>->+<]>[<<<->>>->+<]>[<<<->>>-] to [<<<->->->-].

What it does

,>,>,>                                                              Takes three inputs
                                                                    in three separate cells

-[>+<-----]>---[<+>-]<[<<<->->->-]<                                 Takes 48 off of each to
                                                                    convert them to decimal

[>+<-]<[>>++++++++++<<-]<[>>>>++++++++++[<++++++++++>-]<<<<-]>>>    Combines them into a
                                                                    three digit number by
                                                                    multiplying the first
                                                                    by 100, the second by
                                                                    10 and then adding all
                                                                    three

[>.+<-]                                                             Repeatedly prints the
                                                                    value of the adjacent
                                                                    cell and then adds one
                                                                    to it until it reaches
                                                                    the input value.


Title: This is my pillow

Body:
GameMaker Language, 104 bytes

You should make sure that uninitialized variables don't throw an error. This setting is in the main page of Preferences. Otherwise, add e='' to the beginning of the program.

a="/////"b="\\\\\"d=b+a+b+a+b+a+b c=a+d d+=a for(i=0;i<24;i++)if i mod 8>3e+=d else e+=c e+="#" return e

P.S. Yes, each part of the for loop needs an expression. So I can't for(i=0;i<24;) and have i++ later.

Output

/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////


答:
Perl, 22 bytes

21 bytes of code + 1 byte for -p flag.

s/.(?=.*0)//g;$_=y;1;
```

<p>To run it :</p>

```perl -pE 's/.(?=.*0)//g;$_=y;1;' <<< "0 1 1 0 1 1 1"
```

<p>(Actually, the format of the input doesn't matter a lot : <code>0110111</code>, <code>0 1 1 0 1 1 1</code>, <code>[0,1,1,0,1,1,1]</code> etc. would all work)</p>

<p><hr>
<strong>18 bytes version</strong> from @Dom Hastings but it requires to supply the input as a string of 0 and 1, which isn't allowed :</p>

```perl -pE '/1*$/;$_=length$&' <<< '0110111'
```

Title: Count trailing truths

Body:
Inspired by, and in memory of, my dear friend and colleague,

Dan Baronet, 1956 – 2016. R.I.P.

He found the shortest possible APL solution to this task:

Task

Given a Boolean list, count the number of trailing truth values.

Example cases

{} → 0

{0} → 0

{1} → 1

{0, 1, 1, 0, 0} → 0

{1, 1, 1, 0, 1} → 1

{1, 1, 0, 1, 1} → 2

{0, 0, 1, 1, 1} → 3

{1, 1, 1, 1, 1, 1} → 6

Body:
Perl, 22 bytes

21 bytes of code + 1 byte for -p flag.

s/.(?=.*0)//g;$_=y;1;

To run it :

perl -pE 's/.(?=.*0)//g;$_=y;1;' <<< "0 1 1 0 1 1 1"

(Actually, the format of the input doesn't matter a lot : 0110111, 0 1 1 0 1 1 1, [0,1,1,0,1,1,1] etc. would all work)

18 bytes version from @Dom Hastings but it requires to supply the input as a string of 0 and 1, which isn't allowed :

perl -pE '/1*$/;$_=length$&' <<< '0110111'


答:
Pyth, 64 bytes

Can probably be golfed further. Try it here !

```<code>L?<b5b4DebK+ds:rbZ"[aeiou]{2,}"1J+*/K\a5y/K\oR@G?<J9JhJu+GeHcQd"
</code>```

Title: Decode Baby-talk!

Body:
When babies open their mouths, they're not just spewing gibberish. They're actually talking in a highly advanced, adult-proof cipher...

The Baby-talk Cipher

When a baby talks, it could look something like gogooa gagooook aagaaoooy
Each single-space separated section represents a character (so the example above represents 3 characters).

To decipher a section, we must count number of As and Os it contains. However, we only count those which are adjacent to another vowel. For example, the A in 'gag' would not count, but both the A and O in 'gaog' would.

Counting the example above would look like this:

```<code>Section    | Num Os | Num As

gogooa     | 2      | 1
gagooook   | 4      | 0
aagaaoooy  | 3      | 4
</code>```

We then use these values to convert the input into plaintext on a Polybius square. This is a 5x5 representation of the English alphabet, omitting 'J' (please note that, in baby-talk, 0-counting rules apply to the table):

```<code>  0 1 2 3 4
0 A B C D E
1 F G H I K
2 L M N O P
3 Q R S T U
4 V W X Y Z
</code>```

Using the number of Os as the column, and number of As as the row, we find which character each section represents:

```<code>Section    | Num Os | Num As | Character

gogooa     | 2      | 1      | (2,1) -> H
gagooook   | 4      | 0      | (4,0) -> E
aagaaoooy  | 3      | 4      | (3,4) -> Y
</code>```

Which tells us that the baby was just saying "HEY".

Notes:

- If a section representing a character has more than 4 As or Os, ignore the extras, because 4 is the maximum value on the table.
- For this task, Y is not a vowel - only A, E, I, O and U.

The Challenge

Your task is to create a full program which takes one input, a word in baby-speak, and prints it in plaintext.

Your program must be able to take input in uppercase, lowercase, and a mix of both.

The input will only contain ASCII alphabet letters (A-Z and a-z), with single spaces to seperate the baby words.

The output text can be in any case.

You should the take the input from STDIN and print the plaintext on STDOUT. If your language does not have these, use the nearest equivalent.

This is code-golf, so the shortest code in bytes wins - but any solution is welcome.

Test Cases

```<code>'GLOOG KAKAAOOO ARGOOO OOOOOGUGUU' -> CODE
'oaka pooopaa gaau augu' -> GOLF
'Aoao U oOOAoa oaoAoo aoAoAOa' -> NAPPY
'GUG gAGaA gOougOou' -> ALE
'OOaGOG GoGOOoGoU gAA bLAA GOUGoOUgAIGAI' -> HELLO
</code>```

Body:
Pyth, 64 bytes

Can probably be golfed further. Try it here !

L?<b5b4DebK+ds:rbZ"[aeiou]{2,}"1J+*/K\a5y/K\oR@G?<J9JhJu+GeHcQd"


答:
CJam, <s>24</s> 23 bytes

```<code>"/\\"5e*6*]4*N*_W%]3*N*
</code>```

ONLINE

Thanks 8478 (Martin Ender) for -1.

Explanation:

```<code>"/\\"5e*6*]4*N*_W%]3*N* Code
"/\\"                   Push "/\\"
     5                  Push 5
      e*                Repeat each
        6               Push 6
         *              Repeat
          ]             Wrap stack from [ to ToS in array
           4            Push 4
            *           Repeat
             N          Push N = "\n"
              *         Join
               _        Duplicate
                W       Push W = -1
                 %      Take every nth item
                  ]     Wrap stack from [ to ToS in array
                   3    Push 3
                    *   Repeat
                     N  Push N = "\n"
                      * Join
</code>```

Title: This is my pillow

Body:
...will you help me immortalize it?

I've had this pillow a few years now, and apparently it's time to get rid of it. Can you please write a function or program, that I can bring with me and use to recreate this pillow whenever I want to reminisce a bit.

It must work with no input arguments.

The output should look exactly like this (trailing newlines and spaces are OK).

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

This is code golf, so the shortest code in bytes win!

Leaderboard

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

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

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

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

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

```

Body:
CJam, <s>24</s> 23 bytes

"/\\"5e*6*]4*N*_W%]3*N*

ONLINE

Thanks 8478 (Martin Ender) for -1.

Explanation:

"/\\"5e*6*]4*N*_W%]3*N* Code
"/\\"                   Push "/\\"
     5                  Push 5
      e*                Repeat each
        6               Push 6
         *              Repeat
          ]             Wrap stack from [ to ToS in array
           4            Push 4
            *           Repeat
             N          Push N = "\n"
              *         Join
               _        Duplicate
                W       Push W = -1
                 %      Take every nth item
                  ]     Wrap stack from [ to ToS in array
                   3    Push 3
                    *   Repeat
                     N  Push N = "\n"
                      * Join


答:
05AB1E, 15 bytes

```<code>„/\5×{R6×6FR4F=
</code>```

Try it online!

Explanation:

```<code>„/\             # Push "/\"
   5×           # Repeat string five times: "/\/\/\/\/\"
     {          # Sort: "/////\\\\\"
      R         # Reverse: "\\\\\/////
       6×       # Repeat string six times
         6F     # Repeat the following six times:
           R    #   Reverse
            4F  #   Repeat the following four times:
              = #     Print without popping
</code>```

Uses the CP-1252 encoding.

Title: This is my pillow

Body:
05AB1E, 15 bytes

„/\5×{R6×6FR4F=

Try it online!

Explanation:

„/\             # Push "/\"
   5×           # Repeat string five times: "/\/\/\/\/\"
     {          # Sort: "/////\\\\\"
      R         # Reverse: "\\\\\/////
       6×       # Repeat string six times
         6F     # Repeat the following six times:
           R    #   Reverse
            4F  #   Repeat the following four times:
              = #     Print without popping

Uses the CP-1252 encoding.