答:
><>, 109 bytes

```<code>i:0(?\:}
,[r]l\~l2,[r]rl2
1-:?!\$:}l1-[}
~]\  \
&r\l:?!;1-
?!\$:@@:@$:@@:@)}(}"- |"{?$@{?$o~~$}&1-:&
4.>~ao]2
</code>```

Input is via STDIN. Try it online!

Explaination:

The input it read and mirrored on the first line. For input abcd, this leaves dcbaabcd on the stack. Each half is then mirrored to give abcddcba (line 2). Then, each element is duplicated and left on its own stack in turn (lines 3 and 4). After this process, the stack of stacks looks a little like this:

```<code>aabcddcba  <-- top of the stack of stacks
b
c
d
d
c
b
a          <-- bottom of the stack of stacks
</code>```

For each stack in turn, the row value (the bottom of the stack) is compared to the column value (the top of the stack). The appropriate character is selected from - | and written to STDOUT. The column values are then rotated so that the next column is at the top of the stack (line 6).

Once all the columns have been considered, the row value is discarded, a newline printed, and the column values put onto the previous stack (line 7), for the output process to start again.

The ] command, in addition to popping from the stack of stacks, empties the current stack if it is the only one left. The program's end condition is if the stack is empty, as all rows have been processed (line 5).

Title: Generate Wordenticons

Body:
Identicons are visual depictions of hash values, often made from symmetrical arrangements of geometric shapes. Your default Stack Exchange avatar is an identicon. This challenge is about creating "wordenticons", simple text-based versions of identicons that apply to strings of lowercase letters, i.e. words.

Challenge

Write a program or function that takes in a string S and outputs its wordenticon. S is guaranteed to be nonempty and only contain lowercase English letter characters a-z. You may optionally assume S has a trailing newline.

The wordenticon of S will be a square grid of text with side lengths 2*length(S) composed of spaces ( ), vertical bars, (|), and horizontal bars (―).

To generate the wordenticon of S, form a square grid where every column corresponds to a letter of S (in normal left-to-right reading order) and every row corresponds to a letter of S (in normal top-to-bottom reading order).

For example, if S is food our initial grid looks like

```<code> food
f....
o....
o....
d....
</code>```

where . is just a placeholder.

For every empty point (every .) in the grid:

If the column letter comes before the row letter alphabetically, replace the . with |.

If the column letter comes after the row letter alphabetically, replace the . with ―.

If the column and row letters are the same, replace the . with   (space).

Here is the food example after each of these steps:

Adding |'s:

```<code> food
f...|
o|..|
o|..|
d....
</code>```

Adding ―'s:

```<code> food
f.――|
o|..|
o|..|
d―――.
</code>```

Adding  's:

```<code> food
f ――|
o|  |
o|  |
d―――
</code>```

To complete the wordenticon, remove the superfluous row and column containing the words

```<code> ――|
|  |
|  |
―――
</code>```

then mirror the entire thing horizontally

```<code> ――||――
|  ||  |
|  ||  |
―――  ―――
</code>```

and finally mirror it again vertically

```<code> ――||――
|  ||  |
|  ||  |
―――  ―――
―――  ―――
|  ||  |
|  ||  |
 ――||――
</code>```

resulting in the 2*length(S) side length text grid that is the final wordenticon.

Examples

Here are some additional wordenticon examples. Note that different words can have identical wordenticons and some wordenticons can be completely made of spaces (unfortunately markdown does not want to render those).

```<code>food

 ――||――
|  ||  |
|  ||  |
―――  ―――
―――  ―――
|  ||  |
|  ||  |
 ――||――

mood

 ――||――
|  ||  |
|  ||  |
―――  ―――
―――  ―――
|  ||  |
|  ||  |
 ――||――

foof

 ――  ――
|  ||  |
|  ||  |
 ――  ――
 ――  ――
|  ||  |
|  ||  |
 ――  ――

fool

 ――――――
|  ||  |
|  ||  |
|――  ――|
|――  ――|
|  ||  |
|  ||  |
 ――――――

a [2*2 grid of spaces]

to

 ||
―  ―
―  ―
 ||

it

 ――
|  |
|  |
 ――

tt [4*4 grid of spaces]

abc

 ――――
| ―― |
||  ||
||  ||
| ―― |
 ――――

and

 ――――
| || |
|―  ―|
|―  ―|
| || |
 ――――

but

 ――――
| || |
|―  ―|
|―  ―|
| || |
 ――――

you

 ||||
― ―― ―
―|  |―
―|  |―
― ―― ―
 ||||

bob

 ―  ―
| || |
 ―  ―
 ―  ―
| || |
 ―  ―

cat

 |――|
― ―― ―
||  ||
||  ||
― ―― ―
 |――|

cart

 |――――|
― ―――― ―
|| ―― ||
|||  |||
|||  |||
|| ―― ||
― ―――― ―
 |――――|

todo

 ||||||
― |  | ―
―― ―― ――
― |  | ―
― |  | ―
―― ―― ――
― |  | ―
 ||||||

mice

 ||||||
― |||| ―
―― ―― ――
――|  |――
――|  |――
―― ―― ――
― |||| ―
 ||||||

zyxw

 ||||||
― |||| ―
―― || ――
―――  ―――
―――  ―――
―― || ――
― |||| ―
 ||||||

banana

 |―|―||―|―|
― ― ―  ― ― ―
|| | || | ||
― ― ―  ― ― ―
|| | || | ||
― ― ―  ― ― ―
― ― ―  ― ― ―
|| | || | ||
― ― ―  ― ― ―
|| | || | ||
― ― ―  ― ― ―
 |―|―||―|―|

codegolf

 ――――――――――――――
| ||| |||| ||| |
|― ―――――――――― ―|
|―| ―――――――― |―|
|―|| ――||―― ||―|
| ||| |||| ||| |
|―|||― || ―|||―|
|―||―――  ―――||―|
|―||―――  ―――||―|
|―|||― || ―|||―|
| ||| |||| ||| |
|―|| ――||―― ||―|
|―| ―――――――― |―|
|― ―――――――――― ―|
| ||| |||| ||| |
 ――――――――――――――

programming

 ―||―||||||||||||―||―
| || |||||||||||| || |
―― |―||||||||||||―| ――
――― ―|――――  ――――|― ―――
| || |||||||||||| || |
――――― ―――――――――― ―――――
―――|―|  |―||―|  |―|―――
―――|―|  |―||―|  |―|―――
―――|―|―― ―||― ――|―|―――
―――|―|||| || ||||―|―――
――― ―|――――  ――――|― ―――
――― ―|――――  ――――|― ―――
―――|―|||| || ||||―|―――
―――|―|―― ―||― ――|―|―――
―――|―|  |―||―|  |―|―――
―――|―|  |―||―|  |―|―――
――――― ―――――――――― ―――――
| || |||||||||||| || |
――― ―|――――  ――――|― ―――
―― |―||||||||||||―| ――
| || |||||||||||| || |
 ―||―||||||||||||―||―

abcdefghijklm

 ――――――――――――――――――――――――
| ―――――――――――――――――――――― |
|| ―――――――――――――――――――― ||
||| ―――――――――――――――――― |||
|||| ―――――――――――――――― ||||
||||| ―――――――――――――― |||||
|||||| ―――――――――――― ||||||
||||||| ―――――――――― |||||||
|||||||| ―――――――― ||||||||
||||||||| ―――――― |||||||||
|||||||||| ―――― ||||||||||
||||||||||| ―― |||||||||||
||||||||||||  ||||||||||||
||||||||||||  ||||||||||||
||||||||||| ―― |||||||||||
|||||||||| ―――― ||||||||||
||||||||| ―――――― |||||||||
|||||||| ―――――――― ||||||||
||||||| ―――――――――― |||||||
|||||| ―――――――――――― ||||||
||||| ―――――――――――――― |||||
|||| ―――――――――――――――― ||||
||| ―――――――――――――――――― |||
|| ―――――――――――――――――――― ||
| ―――――――――――――――――――――― |
 ―――――――――――――――――――――――― </code>```

Scoring

This is code-golf, the shortest code in bytes wins. Tiebreaker goes to the earlier answer.

Notes

Any instance of horizontal bar (―) in your code may be counted as 1 byte instead of the 3 UTF-8 bytes it actually takes up. (Up to ten instances.)

If desired you may use regular dashes (-) in place of horizontal bars (―).

Removing or adding trailing spaces in the lines of a wordenticon is not allowed (even if the shape remains unchanged). It should be an exact 2*length(S) side length text square.

The output wordenticon may optionally have a single trailing newline.

Body:
><>, 109 bytes

i:0(?\:}
,[r]l\~l2,[r]rl2
1-:?!\$:}l1-[}
~]\  \
&r\l:?!;1-
?!\$:@@:@$:@@:@)}(}"- |"{?$@{?$o~~$}&1-:&
4.>~ao]2

Input is via STDIN. Try it online!

Explaination:

The input it read and mirrored on the first line. For input abcd, this leaves dcbaabcd on the stack. Each half is then mirrored to give abcddcba (line 2). Then, each element is duplicated and left on its own stack in turn (lines 3 and 4). After this process, the stack of stacks looks a little like this:

aabcddcba  <-- top of the stack of stacks
b
c
d
d
c
b
a          <-- bottom of the stack of stacks

For each stack in turn, the row value (the bottom of the stack) is compared to the column value (the top of the stack). The appropriate character is selected from - | and written to STDOUT. The column values are then rotated so that the next column is at the top of the stack (line 6).

Once all the columns have been considered, the row value is discarded, a newline printed, and the column values put onto the previous stack (line 7), for the output process to start again.

The ] command, in addition to popping from the stack of stacks, empties the current stack if it is the only one left. The program's end condition is if the stack is empty, as all rows have been processed (line 5).


问:
Shortest code to produce infinite output
Write the shortest code you can that produces an infinite output.

That's all. You code will only be disqualified if it stops producing output at some point. As always in code golf, the shortest code wins.

Here's a list of answers that I think are really clever, so they can get credit:

The comma is both code and data

Infinite errors (that counts)

Infinite warnings (that also counts)

What's Marbelous?

Leaderboard

var QUESTION_ID=13152,OVERRIDE_USER=8611;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

```

答:
Emotinomicon 18 bytes, 5 chars

```<code>⏪⏩
</code>```

Explanation:

```<code> - push 0 to the stack
⏪ - open loop
 - push 0 to the stack
 - pop top of the stack, and output it as a number
⏩ - end loop
</code>```

As long as there's something on the stack, it's going to  loop indefinitely

ContentLicense: CC BY-SA 4.0

Body:
Emotinomicon 18 bytes, 5 chars

⏪⏩

Explanation:

 - push 0 to the stack
⏪ - open loop
 - push 0 to the stack
 - pop top of the stack, and output it as a number
⏩ - end loop

As long as there's something on the stack, it's going to  loop indefinitely

ContentLicense: CC BY-SA 3.0


问:
Generate Wordenticons
Identicons are visual depictions of hash values, often made from symmetrical arrangements of geometric shapes. Your default Stack Exchange avatar is an identicon. This challenge is about creating "wordenticons", simple text-based versions of identicons that apply to strings of lowercase letters, i.e. words.

Challenge

Write a program or function that takes in a string S and outputs its wordenticon. S is guaranteed to be nonempty and only contain lowercase English letter characters a-z. You may optionally assume S has a trailing newline.

The wordenticon of S will be a square grid of text with side lengths 2*length(S) composed of spaces ( ), vertical bars, (|), and horizontal bars (―).

To generate the wordenticon of S, form a square grid where every column corresponds to a letter of S (in normal left-to-right reading order) and every row corresponds to a letter of S (in normal top-to-bottom reading order).

For example, if S is food our initial grid looks like

```<code> food
f....
o....
o....
d....
</code>```

where . is just a placeholder.

For every empty point (every .) in the grid:

If the column letter comes before the row letter alphabetically, replace the . with |.

If the column letter comes after the row letter alphabetically, replace the . with ―.

If the column and row letters are the same, replace the . with   (space).

Here is the food example after each of these steps:

Adding |'s:

```<code> food
f...|
o|..|
o|..|
d....
</code>```

Adding ―'s:

```<code> food
f.――|
o|..|
o|..|
d―――.
</code>```

Adding  's:

```<code> food
f ――|
o|  |
o|  |
d―――
</code>```

To complete the wordenticon, remove the superfluous row and column containing the words

```<code> ――|
|  |
|  |
―――
</code>```

then mirror the entire thing horizontally

```<code> ――||――
|  ||  |
|  ||  |
―――  ―――
</code>```

and finally mirror it again vertically

```<code> ――||――
|  ||  |
|  ||  |
―――  ―――
―――  ―――
|  ||  |
|  ||  |
 ――||――
</code>```

resulting in the 2*length(S) side length text grid that is the final wordenticon.

Examples

Here are some additional wordenticon examples. Note that different words can have identical wordenticons and some wordenticons can be completely made of spaces (unfortunately markdown does not want to render those).

```<code>food

 ――||――
|  ||  |
|  ||  |
―――  ―――
―――  ―――
|  ||  |
|  ||  |
 ――||――

mood

 ――||――
|  ||  |
|  ||  |
―――  ―――
―――  ―――
|  ||  |
|  ||  |
 ――||――

foof

 ――  ――
|  ||  |
|  ||  |
 ――  ――
 ――  ――
|  ||  |
|  ||  |
 ――  ――

fool

 ――――――
|  ||  |
|  ||  |
|――  ――|
|――  ――|
|  ||  |
|  ||  |
 ――――――

a [2*2 grid of spaces]

to

 ||
―  ―
―  ―
 ||

it

 ――
|  |
|  |
 ――

tt [4*4 grid of spaces]

abc

 ――――
| ―― |
||  ||
||  ||
| ―― |
 ――――

and

 ――――
| || |
|―  ―|
|―  ―|
| || |
 ――――

but

 ――――
| || |
|―  ―|
|―  ―|
| || |
 ――――

you

 ||||
― ―― ―
―|  |―
―|  |―
― ―― ―
 ||||

bob

 ―  ―
| || |
 ―  ―
 ―  ―
| || |
 ―  ―

cat

 |――|
― ―― ―
||  ||
||  ||
― ―― ―
 |――|

cart

 |――――|
― ―――― ―
|| ―― ||
|||  |||
|||  |||
|| ―― ||
― ―――― ―
 |――――|

todo

 ||||||
― |  | ―
―― ―― ――
― |  | ―
― |  | ―
―― ―― ――
― |  | ―
 ||||||

mice

 ||||||
― |||| ―
―― ―― ――
――|  |――
――|  |――
―― ―― ――
― |||| ―
 ||||||

zyxw

 ||||||
― |||| ―
―― || ――
―――  ―――
―――  ―――
―― || ――
― |||| ―
 ||||||

banana

 |―|―||―|―|
― ― ―  ― ― ―
|| | || | ||
― ― ―  ― ― ―
|| | || | ||
― ― ―  ― ― ―
― ― ―  ― ― ―
|| | || | ||
― ― ―  ― ― ―
|| | || | ||
― ― ―  ― ― ―
 |―|―||―|―|

codegolf

 ――――――――――――――
| ||| |||| ||| |
|― ―――――――――― ―|
|―| ―――――――― |―|
|―|| ――||―― ||―|
| ||| |||| ||| |
|―|||― || ―|||―|
|―||―――  ―――||―|
|―||―――  ―――||―|
|―|||― || ―|||―|
| ||| |||| ||| |
|―|| ――||―― ||―|
|―| ―――――――― |―|
|― ―――――――――― ―|
| ||| |||| ||| |
 ――――――――――――――

programming

 ―||―||||||||||||―||―
| || |||||||||||| || |
―― |―||||||||||||―| ――
――― ―|――――  ――――|― ―――
| || |||||||||||| || |
――――― ―――――――――― ―――――
―――|―|  |―||―|  |―|―――
―――|―|  |―||―|  |―|―――
―――|―|―― ―||― ――|―|―――
―――|―|||| || ||||―|―――
――― ―|――――  ――――|― ―――
――― ―|――――  ――――|― ―――
―――|―|||| || ||||―|―――
―――|―|―― ―||― ――|―|―――
―――|―|  |―||―|  |―|―――
―――|―|  |―||―|  |―|―――
――――― ―――――――――― ―――――
| || |||||||||||| || |
――― ―|――――  ――――|― ―――
―― |―||||||||||||―| ――
| || |||||||||||| || |
 ―||―||||||||||||―||―

abcdefghijklm

 ――――――――――――――――――――――――
| ―――――――――――――――――――――― |
|| ―――――――――――――――――――― ||
||| ―――――――――――――――――― |||
|||| ―――――――――――――――― ||||
||||| ―――――――――――――― |||||
|||||| ―――――――――――― ||||||
||||||| ―――――――――― |||||||
|||||||| ―――――――― ||||||||
||||||||| ―――――― |||||||||
|||||||||| ―――― ||||||||||
||||||||||| ―― |||||||||||
||||||||||||  ||||||||||||
||||||||||||  ||||||||||||
||||||||||| ―― |||||||||||
|||||||||| ―――― ||||||||||
||||||||| ―――――― |||||||||
|||||||| ―――――――― ||||||||
||||||| ―――――――――― |||||||
|||||| ―――――――――――― ||||||
||||| ―――――――――――――― |||||
|||| ―――――――――――――――― ||||
||| ―――――――――――――――――― |||
|| ―――――――――――――――――――― ||
| ―――――――――――――――――――――― |
 ―――――――――――――――――――――――― </code>```

Scoring

This is code-golf, the shortest code in bytes wins. Tiebreaker goes to the earlier answer.

Notes

Any instance of horizontal bar (―) in your code may be counted as 1 byte instead of the 3 UTF-8 bytes it actually takes up. (Up to ten instances.)

If desired you may use regular dashes (-) in place of horizontal bars (―).

Removing or adding trailing spaces in the lines of a wordenticon is not allowed (even if the shape remains unchanged). It should be an exact 2*length(S) side length text square.

The output wordenticon may optionally have a single trailing newline.

Title: Generate Wordenticons

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

6 bytes thanks to @Zgarb.

' |-'{~3*@-/~@u:[,|.

Previous 26-byte answer

({&' |-')@*@-/~@(3&u:)@,|.

Uses the same algorithm as Dennis' answer.

Usage:

>> f =: ' |-'{~3*@-/~@u:[,|.
>> f 'food'
<<  --||--
   |  ||  |
   |  ||  |
   ---  ---
   ---  ---
   |  ||  |
   |  ||  |
    --||--

>> f 'supercalifragilisticexpialidocious'
<<  -|||||||||||||| -|||-||||||||||-  -||||||||||-|||- ||||||||||||||-
   | |||||||||||||||||||-|||||||||| || ||||||||||-||||||||||||||||||| |
   -- |-|||||-|||||--|||- |||||||||----||||||||| -|||--|||||-|||||-| --
   --- -||----|-------| ---|--|-|--------|-|--|--- |-------|----||- ---
   --|| ||||| |||||--|||-||||||||||----||||||||||-|||--||||| ||||| ||--
   ----- |----|------- ----|---- -------- ----|---- -------|----| -----
   ------ ---- ------------ ------------------ ------------ ---- ------
   ---|-|| ||-||| |--|||--|| ||-||------||-|| ||--|||--| |||-|| ||-|---
   ---|-||- |-|| - -- ||-- |- |-| ------ |-| -| --|| -- - ||-| -||-|---
   ---|-||-- -|-------||---|--|-|--------|-|--|---||-------|- --||-|---
   --|| ||||| |||||--|||-||||||||||----||||||||||-|||--||||| ||||| ||--
   ------ ---- ------------ ------------------ ------------ ---- ------
   ---|-||--|-| ------||---|--|-|--------|-|--|---||------ |-|--||-|---
   ---|-||- |-|| - -- ||-- |- |-| ------ |-| -| --|| -- - ||-| -||-|---
   ---|-|| ||-||| |--|||--|| ||-||------||-|| ||--|||--| |||-|| ||-|---
   ---|-||- |-|| - -- ||-- |- |-| ------ |-| -| --|| -- - ||-| -||-|---
    -|||||||||||||| -|||-||||||||||-  -||||||||||-|||- ||||||||||||||-
   |-||||||||||||||| |||-||||||||||-||-||||||||||-||| |||||||||||||||-|
   ---|-||- |-|| - -- ||-- |- |-| ------ |-| -| --|| -- - ||-| -||-|---
   ----- |----|------- ----|---- -------- ----|---- -------|----| -----
   --- -||----|-------| ---|--|-|--------|-|--|--- |-------|----||- ---
   ||||||||||||||||||||| |||||||||||||||||||||||| |||||||||||||||||||||
   -- |-|||||-|||||--|||- |||||||||----||||||||| -|||--|||||-|||||-| --
   ---|-||- |-|| - -- ||-- |- |-| ------ |-| -| --|| -- - ||-| -||-|---
   ------ ---- ------------ ------------------ ------------ ---- ------
   ---|-|| ||-||| |--|||--|| ||-||------||-|| ||--|||--| |||-|| ||-|---
   ---|-||- |-|| - -- ||-- |- |-| ------ |-| -| --|| -- - ||-| -||-|---
   -----||----|-------|----|-- -|--------|- --|----|-------|----||-----
   ---|-|||||-|||||--|||--||||| || ---- || |||||--|||--|||||-|||||-|---
   ----- |----|------- ----|---- -------- ----|---- -------|----| -----
   ---|-||- |-|| - -- ||-- |- |-| ------ |-| -| --|| -- - ||-| -||-|---
   ---|-|||||-|||||--|||--||||| || ---- || |||||--|||--|||||-|||||-|---
   | |||||||||||||||||||-|||||||||| || ||||||||||-||||||||||||||||||| |
    -|||||||||||||| -|||-||||||||||-  -||||||||||-|||- ||||||||||||||-
    -|||||||||||||| -|||-||||||||||-  -||||||||||-|||- ||||||||||||||-
   | |||||||||||||||||||-|||||||||| || ||||||||||-||||||||||||||||||| |
   ---|-|||||-|||||--|||--||||| || ---- || |||||--|||--|||||-|||||-|---
   ---|-||- |-|| - -- ||-- |- |-| ------ |-| -| --|| -- - ||-| -||-|---
   ----- |----|------- ----|---- -------- ----|---- -------|----| -----
   ---|-|||||-|||||--|||--||||| || ---- || |||||--|||--|||||-|||||-|---
   -----||----|-------|----|-- -|--------|- --|----|-------|----||-----
   ---|-||- |-|| - -- ||-- |- |-| ------ |-| -| --|| -- - ||-| -||-|---
   ---|-|| ||-||| |--|||--|| ||-||------||-|| ||--|||--| |||-|| ||-|---
   ------ ---- ------------ ------------------ ------------ ---- ------
   ---|-||- |-|| - -- ||-- |- |-| ------ |-| -| --|| -- - ||-| -||-|---
   -- |-|||||-|||||--|||- |||||||||----||||||||| -|||--|||||-|||||-| --
   ||||||||||||||||||||| |||||||||||||||||||||||| |||||||||||||||||||||
   --- -||----|-------| ---|--|-|--------|-|--|--- |-------|----||- ---
   ----- |----|------- ----|---- -------- ----|---- -------|----| -----
   ---|-||- |-|| - -- ||-- |- |-| ------ |-| -| --|| -- - ||-| -||-|---
   |-||||||||||||||| |||-||||||||||-||-||||||||||-||| |||||||||||||||-|
    -|||||||||||||| -|||-||||||||||-  -||||||||||-|||- ||||||||||||||-
   ---|-||- |-|| - -- ||-- |- |-| ------ |-| -| --|| -- - ||-| -||-|---
   ---|-|| ||-||| |--|||--|| ||-||------||-|| ||--|||--| |||-|| ||-|---
   ---|-||- |-|| - -- ||-- |- |-| ------ |-| -| --|| -- - ||-| -||-|---
   ---|-||--|-| ------||---|--|-|--------|-|--|---||------ |-|--||-|---
   ------ ---- ------------ ------------------ ------------ ---- ------
   --|| ||||| |||||--|||-||||||||||----||||||||||-|||--||||| ||||| ||--
   ---|-||-- -|-------||---|--|-|--------|-|--|---||-------|- --||-|---
   ---|-||- |-|| - -- ||-- |- |-| ------ |-| -| --|| -- - ||-| -||-|---
   ---|-|| ||-||| |--|||--|| ||-||------||-|| ||--|||--| |||-|| ||-|---
   ------ ---- ------------ ------------------ ------------ ---- ------
   ----- |----|------- ----|---- -------- ----|---- -------|----| -----
   --|| ||||| |||||--|||-||||||||||----||||||||||-|||--||||| ||||| ||--
   --- -||----|-------| ---|--|-|--------|-|--|--- |-------|----||- ---
   -- |-|||||-|||||--|||- |||||||||----||||||||| -|||--|||||-|||||-| --
   | |||||||||||||||||||-|||||||||| || ||||||||||-||||||||||||||||||| |
    -|||||||||||||| -|||-||||||||||-  -||||||||||-|||- ||||||||||||||-

(>> meaning input (STDIN), << meaning output (STDOUT))


问:
Maximum Maxima!
Inspired by this question and refined by Luis Mendo.

Challenge

Given a 2D matrix of integers, each row has a maximum value. One or more elements of each row will be equal to the maximum value of their respective row. Your goal is to determine which column(s) contain the most entries which are equal to their respective row's maximum value as well as the number of row-wise maxima found in these columns.

Input

The input will be a non-empty M x N matrix (M > 0 and N > 0) in whatever form is well-suited to your language of choice.

Output

Your program should return the index of each column containing the maximum number of row-wise maxima (either as separate values or a list). Either 0- or 1-based indexing can be used (specify in your description).

Your program should also return the number of maxima that were present in these columns (a single number).

The order/format of the output is flexible but should be explained in the text accompanying your answer.

Additional Information

All entries in the input matrix will be positive integers.

If the maximum value of a row is shared by multiple elements in that row, all
occurrences of that value count towards their columns' total.

If multiple columns contain the same number of maxima, you should return a list of all columns
which had this number of maxima.

An Example

Consider input

```<code> 7  93
69  35
77  30
</code>```

Row 1 has maxium 93, which occurs only once, namely at column 2. Row 2: occurs at column 1. Row 3: also at column 1. So the winner column is 1, with 2 maxima. Thus the output will be [1] [2]. If we change the input to

```<code> 7  93
69  35
77  77
</code>```

the output will be [1 2] [2], because both columns have 2 maxima.

Test Cases

```<code>input                 =>    output ( [1-based index array], [nMaxima] )
----------------------------------------------
 7  93
69  35                =>    [1], [2]
77  30

 7  93
69  35                =>    [1 2], [2]
77  77

1   2   3   4         =>    [4], [2]
5   6   7   8

16   2   3  13
 5  11  10   8        =>    [1  2  4], [1]
 9   7   6  12

 1   1   1   1        =>    [1  2  3  4], [1]

25   6  13  25        =>    [1  4], [1]

1
2
3                     =>    [1], [4]
4

100                   =>    [1], [1]
</code>```

Scoring

This is code-golf, the shortest code in bytes wins. Tiebreaker goes to the earlier answer.

Leaderboard

Below is a stack snippet for analyzing all entries.

var QUESTION_ID=80788,OVERRIDE_USER=51939;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

```

答:
Pyke, 17 bytes

```<code>FDSeRmq),AsDSe
R%
</code>```

Try it here!

Title: Maximum Maxima!

Body:
Pyke, 17 bytes

FDSeRmq),AsDSe
R%

Try it here!


答:
J, 27 bytes

```<code>((I.@:=;])>./)@(+/@:=>./"1)
</code>```

This is a monadic verb, used as follows in the case of the second example:

```<code>   f =: ((I.@:=;])>./)@(+/@:=>./"1)
   m =: 3 2 $ 7 93 69 35 77 77
   f m
+---+-+
|0 1|1|
+---+-+
</code>```

The output consists of two boxes, and uses 0-based indexing. Try it here!

Explanation

```<code>((I.@:=;])>./)@(+/@:=>./"1)  Input is m.
(            )@(          )  Composition: apply right hand side, then left hand side.
                     >./"1   Take maximum of each row of m.
                    =        Replace row maxima by 1 and other values by 0,
                +/@:         then take sum (number of maxima) on each column.
                             The result is the array of number of row maxima in each column.
          >./                Compute the maximum of this array
 (     ;])                   and put it in a box with
  I.@:=                      the indices of those entries that are equal to it.
</code>```

Title: Maximum Maxima!

Body:
Inspired by this question and refined by Luis Mendo.

Challenge

Given a 2D matrix of integers, each row has a maximum value. One or more elements of each row will be equal to the maximum value of their respective row. Your goal is to determine which column(s) contain the most entries which are equal to their respective row's maximum value as well as the number of row-wise maxima found in these columns.

Input

The input will be a non-empty M x N matrix (M > 0 and N > 0) in whatever form is well-suited to your language of choice.

Output

Your program should return the index of each column containing the maximum number of row-wise maxima (either as separate values or a list). Either 0- or 1-based indexing can be used (specify in your description).

Your program should also return the number of maxima that were present in these columns (a single number).

The order/format of the output is flexible but should be explained in the text accompanying your answer.

Additional Information

All entries in the input matrix will be positive integers.

If the maximum value of a row is shared by multiple elements in that row, all
occurrences of that value count towards their columns' total.

If multiple columns contain the same number of maxima, you should return a list of all columns
which had this number of maxima.

An Example

Consider input

```<code> 7  93
69  35
77  30
</code>```

Row 1 has maxium 93, which occurs only once, namely at column 2. Row 2: occurs at column 1. Row 3: also at column 1. So the winner column is 1, with 2 maxima. Thus the output will be [1] [2]. If we change the input to

```<code> 7  93
69  35
77  77
</code>```

the output will be [1 2] [2], because both columns have 2 maxima.

Test Cases

```<code>input                 =>    output ( [1-based index array], [nMaxima] )
----------------------------------------------
 7  93
69  35                =>    [1], [2]
77  30

 7  93
69  35                =>    [1 2], [2]
77  77

1   2   3   4         =>    [4], [2]
5   6   7   8

16   2   3  13
 5  11  10   8        =>    [1  2  4], [1]
 9   7   6  12

 1   1   1   1        =>    [1  2  3  4], [1]

25   6  13  25        =>    [1  4], [1]

1
2
3                     =>    [1], [4]
4

100                   =>    [1], [1]
</code>```

Scoring

This is code-golf, the shortest code in bytes wins. Tiebreaker goes to the earlier answer.

Leaderboard

Below is a stack snippet for analyzing all entries.

var QUESTION_ID=80788,OVERRIDE_USER=51939;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:
J, 27 bytes

((I.@:=;])>./)@(+/@:=>./"1)

This is a monadic verb, used as follows in the case of the second example:

   f =: ((I.@:=;])>./)@(+/@:=>./"1)
   m =: 3 2 $ 7 93 69 35 77 77
   f m
+---+-+
|0 1|1|
+---+-+

The output consists of two boxes, and uses 0-based indexing. Try it here!

Explanation

((I.@:=;])>./)@(+/@:=>./"1)  Input is m.
(            )@(          )  Composition: apply right hand side, then left hand side.
                     >./"1   Take maximum of each row of m.
                    =        Replace row maxima by 1 and other values by 0,
                +/@:         then take sum (number of maxima) on each column.
                             The result is the array of number of row maxima in each column.
          >./                Compute the maximum of this array
 (     ;])                   and put it in a box with
  I.@:=                      the indices of those entries that are equal to it.


答:
MATL, 17 bytes

```<code>vH3$X>G=XstX>tb=f
</code>```

The first output is the max number of maxima and the second output is the columns in which this occured (1-based indexing).

Try it Online!

Explanation

```<code>v       % Vertically concatenate everything on the stack (nothing), yields []
        % Implicitly grab the input
H       % Push the number 2 to the stack
3$X>    % Compute the maximum value of each row (along the second dimension)
G       % Explicitly grab input again
=       % Compare each row of the input to the row-wise max (automatically broadcasts).
Xs      % Sum the number of matches in each column
t       % Duplicate the array
X>      % Determine the max number of maxima in all columns
t       % Duplicate this value
b=f     % Find the index of the columns which had the maximum number of maxima
        % Implicitly display stack contents
</code>```

Title: Maximum Maxima!

Body:
MATL, 17 bytes

vH3$X>G=XstX>tb=f

The first output is the max number of maxima and the second output is the columns in which this occured (1-based indexing).

Try it Online!

Explanation

v       % Vertically concatenate everything on the stack (nothing), yields []
        % Implicitly grab the input
H       % Push the number 2 to the stack
3$X>    % Compute the maximum value of each row (along the second dimension)
G       % Explicitly grab input again
=       % Compare each row of the input to the row-wise max (automatically broadcasts).
Xs      % Sum the number of matches in each column
t       % Duplicate the array
X>      % Determine the max number of maxima in all columns
t       % Duplicate this value
b=f     % Find the index of the columns which had the maximum number of maxima
        % Implicitly display stack contents


问:
Is this figure connected?
You are given a list of (x,y) grid coordinates.  Your function should decide whether the figure obtained by coloring in the squares of the grid with the given coordinates is connected or not.

Squares adjacent diagonally are not considered connected.

Example input:

```<code>(0,0),(1,0),(2,0),(3,0),(3,1),(3,2),(2,2),
(1,2),(0,2),(0,3),(0,4),(1,4),(2,4),(3,4)
</code>```

which looks like:

```<code>****
*
****
   *
****
</code>```

Output:

```<code>YES
</code>```

Example input:

```<code>(0,0),(1,0),(2,0),(0,1),(0,2),(2,2),(3,2),(4,2),(0,3),
(4,3),(0,4),(1,4),(2,4),(4,4),(4,5),(2,6),(3,6),(4,6)
</code>```

which looks like:

```<code>  ***
    *
*** *
*   *
* ***
*
***
</code>```

Output:

```<code>NO
</code>```

Your function must take as input a list of pairs of integers (e.g. in C++, maybe vector<pair<int,int>>) and return a boolean.  You may not assume any particular ordering of the input points.  The coordinates will be between 0 and 99 inclusive.

Smallest code wins.

ContentLicense: CC BY-SA 2.5

Title: Is this figure connected?

Body:
Ruby - 82

c=->s{(a=->x,y{a[x,y-1]&a[x+1,y]&a[x,y+1]&a[x-1,y]if s.delete [x,y];s})[*s[0]][0]}

Ungolfed:

def c(s)
        a=->x,y{
            if s.delete([x,y])
                a[x,y-1]
                a[x+1,y]
                a[x,y+1]
                a[x-1,y]
            end
        }
        x,y=s.first
        a[x,y]
        s.size != 0
end

Usage:

print s([ [0,0],[2,0],[3,0],[3,1],[3,2],[2,2],[1,2],
    [0,2],[0,3],[0,4],[1,4],[2,4],[3,4]
]) ? "NO" : "YES"


问:
Generate an infinite group of infinite galaxies
Here is the challenge as proposed by @trichoplax thanks to him for consolidating my post and standarizing it to PPCG common-rules.

A galaxy is a group of numbers where each one is mapped to another via a precise function f either a symbolic one or mathematical, a structure of numbers sharing some common points with this challenge i got inspired from with an exception that a galaxy sequence is not cyclic, but holds in a black hole, where more than one number can be mapped to it.

A black hole is a specific unique number from a galaxy where all numbers (not individually) are mapped transitively to it, by repeating a function f infinitely over an infinite far number in a same galaxy, or just once if a number is the closest in the same galaxy, for example if the function is the ceiling of the square root then a black hole for the biggest galaxy so far excluding only the number 1 is 2, because mapping the closest number 3 or the infinite repetitively leads to the same number.

Task

Conceive a universe of an infinite number of distinct galaxies where all galaxies encompass an infinite number of integers.

Note that the example of ceiling of square root is banned for two reasons:

The galaxy {1} is finite.

There is a finite number of galaxies.

A valid example, is dividing by the smallest prime factor. This gives an infinite number of infinite galaxies.

```<code>2*2*3*5*5*7, 2*3*5*5*7, 3*5*5*7, 5*5*7, 5*7, 7, 7*5*5*5, 7*5*5*5....
5*5*7*11, 5*7*11, 11*7*7*7... , ....
...
</code>```

Or one galaxy as a tree:

```<code>2*2*5 - 2*5 \
             \
2*3*5 - 3*5 - 5
3*3*5 /       |
             /
2*5*5 - 5*5 /
3*5*5 /
</code>```

Each galaxy consists of all numbers that share the same largest prime factor, and the function takes them all step by step towards the black hole which is that prime factor.

Note also, you may choose any domain of integers as long as the range is infinite, i mean you can exclude a range of numbers that makes the rest still boundless like {1,0} from last example.

Your program takes any integer input via a function's dimension , STDIN, and outputs an integer as the image mapped from this preimage, otherwise prints "error" or any string prespecified for an outputless range of enteries.

For the same example:

(IN/OUTPUT)

```<code>   20
   10

   15
   5

   77
   11

   0
   'undefined'

   1
   'undefined'
</code>```

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

I would have really liked to add a bonus-score for anyone who succeeds to find a function generating a universe without trees, alas, bonuses for code-golf are excluded.

Body:
Python, 40 bytes

lambda n:n&~-n and int(bin(n)[3:],2)or n

Clear the top bit if there's more than one bit set, otherwise returns the number itself. The domain is the positive integers.

First couple numbers (in binary):

    1:     1
   10:    10
   11:     1
  100:   100
  101:     1
  110:    10
  111:    11
 1000:  1000
 1001:     1
 1010:    10
 1011:    11
 1100:   100
 1101:   101
 1110:   110
 1111:   111
10000: 10000
10001:     1
10010:    10
10011:    11
10100:   100
10101:   101
10110:   110
10111:   111
11000:  1000
11001:  1001
11010:  1010
11011:  1011
11100:  1100
11101:  1101
11110:  1110
11111:  1111


答:
C#, <s>169</s> 150 bytes

thanks FryAmTheEggman

```<code>void f(string s){s+=new string(s.Reverse().ToArray());foreach(char c in s){var t="";foreach(char k in s)t+=c==k?" ":c>k?"|":"-";Console.WriteLine(t);}
</code>```

ungolfed:

```<code>    public static void f(string s)
    {
        s += new string(s.Reverse().ToArray());
        foreach (char c in s)
        {
            var t="";
            foreach (char k in s)
            t+=c==k?" ":c>k?"|":"-";

            Console.WriteLine(t);
        }

    }
</code>```

more golfing advice appreciated

Title: Generate Wordenticons

Body:
C#, <s>169</s> 150 bytes

thanks FryAmTheEggman

void f(string s){s+=new string(s.Reverse().ToArray());foreach(char c in s){var t="";foreach(char k in s)t+=c==k?" ":c>k?"|":"-";Console.WriteLine(t);}

ungolfed:

    public static void f(string s)
    {
        s += new string(s.Reverse().ToArray());
        foreach (char c in s)
        {
            var t="";
            foreach (char k in s)
            t+=c==k?" ":c>k?"|":"-";

            Console.WriteLine(t);
        }

    }

more golfing advice appreciated


答:
Python 2, 29 bytes

```<code>lambda n:int("0"+`n`[1:])or n
</code>```

Strips off the first digit, unless that makes the number 0. The domain is the positive integers.

Title: Generate an infinite group of infinite galaxies

Body:
Here is the challenge as proposed by @trichoplax thanks to him for consolidating my post and standarizing it to PPCG common-rules.

A galaxy is a group of numbers where each one is mapped to another via a precise function f either a symbolic one or mathematical, a structure of numbers sharing some common points with this challenge i got inspired from with an exception that a galaxy sequence is not cyclic, but holds in a black hole, where more than one number can be mapped to it.

A black hole is a specific unique number from a galaxy where all numbers (not individually) are mapped transitively to it, by repeating a function f infinitely over an infinite far number in a same galaxy, or just once if a number is the closest in the same galaxy, for example if the function is the ceiling of the square root then a black hole for the biggest galaxy so far excluding only the number 1 is 2, because mapping the closest number 3 or the infinite repetitively leads to the same number.

Task

Conceive a universe of an infinite number of distinct galaxies where all galaxies encompass an infinite number of integers.

Note that the example of ceiling of square root is banned for two reasons:

The galaxy {1} is finite.

There is a finite number of galaxies.

A valid example, is dividing by the smallest prime factor. This gives an infinite number of infinite galaxies.

```<code>2*2*3*5*5*7, 2*3*5*5*7, 3*5*5*7, 5*5*7, 5*7, 7, 7*5*5*5, 7*5*5*5....
5*5*7*11, 5*7*11, 11*7*7*7... , ....
...
</code>```

Or one galaxy as a tree:

```<code>2*2*5 - 2*5 \
             \
2*3*5 - 3*5 - 5
3*3*5 /       |
             /
2*5*5 - 5*5 /
3*5*5 /
</code>```

Each galaxy consists of all numbers that share the same largest prime factor, and the function takes them all step by step towards the black hole which is that prime factor.

Note also, you may choose any domain of integers as long as the range is infinite, i mean you can exclude a range of numbers that makes the rest still boundless like {1,0} from last example.

Your program takes any integer input via a function's dimension , STDIN, and outputs an integer as the image mapped from this preimage, otherwise prints "error" or any string prespecified for an outputless range of enteries.

For the same example:

(IN/OUTPUT)

```<code>   20
   10

   15
   5

   77
   11

   0
   'undefined'

   1
   'undefined'
</code>```

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

I would have really liked to add a bonus-score for anyone who succeeds to find a function generating a universe without trees, alas, bonuses for code-golf are excluded.

Body:
Python 2, 29 bytes

lambda n:int("0"+`n`[1:])or n

Strips off the first digit, unless that makes the number 0. The domain is the positive integers.


答:
JavaScript (ES6), 111 bytes

```<code>a=>[m=Math.max(...a=a[0].map((_,i)=>a.map(a=>c+=a[i]==Math.min(...a),c=0)|c)),[...a.keys()].filter(i=>a[i]==m)]
</code>```

Returns an array of two elements; the first is the maximum count of maxima, the second is the array of zero-indexed columns with that count.

Title: Maximum Maxima!

Body:
JavaScript (ES6), 111 bytes

a=>[m=Math.max(...a=a[0].map((_,i)=>a.map(a=>c+=a[i]==Math.min(...a),c=0)|c)),[...a.keys()].filter(i=>a[i]==m)]

Returns an array of two elements; the first is the maximum count of maxima, the second is the array of zero-indexed columns with that count.


答:
Pyth, 5 bytes

```<code>|stzz
</code>```

Port of my Python answer (the decimal version).

Body:
Pyth, 5 bytes

|stzz

Port of my Python answer (the decimal version).


答:
Python 2, 15 bytes

```<code>lambda n:n>>n%2
</code>```

The domain is nonnegative integers.

Body:
Python 2, 15 bytes

lambda n:n>>n%2

The domain is nonnegative integers.


问:
Shortest infinite loop producing no output
Your task is to create the shortest infinite loop!

The point of this challenge is to create an infinite loop producing no output, unlike its possible duplicate. The reason to this is because the code might be shorter if no output is given.

Rules

Each submission must be a full program.

You must create the shortest infinite loop.

Even if your program runs out of memory eventually, it is still accepted as long as it is running the whole time from the start to when it runs out of memory. Also when it runs out of memory, it should still not print anything to STDERR.

The program must take no input (however, reading from a file is allowed), and should not print anything to STDOUT. Output to a file is also forbidden.

The program must not write anything to STDERR.

Feel free to use a language (or language version) even if it's newer than this challenge.
-Note that there must be an interpreter so the submission can be tested. It is allowed (and even encouraged) to write this interpreter yourself for a previously unimplemented language. :D

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

This is not about finding the language with the shortest infinite loop program. This is about finding the shortest infinite loop program in every language. Therefore, I will not accept an answer.

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

There should be a website such as Wikipedia, Esolangs, or GitHub for the language. For example, if the language is CJam, then one could link to the site in the header like #[CJam](http://sourceforge.net/p/cjam/wiki/Home/), X bytes.

Standard loopholes are not allowed.

(I have taken some of these rules from Martin Büttner's "Hello World" challenge)

Please feel free to post in the comments to tell me how this challenge could be  improved.

Catalogue

This is a Stack Snippet which generates both an alphabetical catalogue of the used languages, and an overall leaderboard. To make sure your answer shows up, please start it with this Markdown header:

```<code># Language name, X bytes
</code>```

Obviously replacing Language name and X bytes with the proper items. If you want to link to the languages' website, use this template, as posted above:

```<code>#[Language name](http://link.to/the/language), X bytes
</code>```

Now, finally, here's the snippet: (Try pressing "Full page" for a better view.)

var QUESTION_ID=59347;var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";var COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk";var OVERRIDE_USER=41805;var answers=[],answers_hash,answer_ids,answer_page=1,more_answers=true,comment_page;function answersUrl(index){return"//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"//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}#answer-list{padding:10px;width:500px;float:left}#language-list{padding:10px;padding-right:40px;width:500px;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">

Shortest Solution by Language

Language	User	Score

Leaderboard

	Author	Language	Size

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

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

```

答:
Churro, 20 bytes

```<code>{o}=}{==={*}{===={*}
</code>```

Consists of three churros. {o}=} pushes 1 to the stack, and {==={*} and {===={*} loop while the top of stack is not zero.

Body:
Churro, 20 bytes

{o}=}{==={*}{===={*}

Consists of three churros. {o}=} pushes 1 to the stack, and {==={*} and {===={*} loop while the top of stack is not zero.


答:
JavaScript (ES6), 12 bytes

```<code>n=>n%2?n:n/2
</code>```

The domain is the positive integers. The black holes are the odd numbers.

Body:
JavaScript (ES6), 12 bytes

n=>n%2?n:n/2

The domain is the positive integers. The black holes are the odd numbers.


问:
Illiteral Prime numbers
Your challenge is to write a program (full program, not a function), that will take an integer and output all prime numbers up to (including) the given integer. Output is any readable list containing all integer primes (array, string, 1 prime per line, whatever you want) and must run to stdout or equivalent.

Simple? Here's the twist:

You may not use literals in your program. These include:

Literal numbers (0 through 9)

Literal strings (in quotes)

You may not use built in prime checks

EDIT: A prime check is a built in function that

Returns if a number is a prime number

Returns a prime number

Returns a list of prime numbers

You may code your own functions that do the above

Prime factorisation functions are allowed

As this is code-golf, shortest answer in bytes wins

答:
Ruby, 53

```<code>$..upto(gets.to_i){|i|($....i).one?{|f|i%f<$.}&&p(i)}
</code>```

This uses the $. magic variable in place of numeric literals, since it starts off as 0 and is incremented when we call gets to read from standard input. We can then define a prime number as a number that has exactly one factor less than it ($....i means the range from 1 to i excluding i) to avoid erroneously printing 0 and 1.

Title: Illiteral Prime numbers

Body:
Ruby, 53

$..upto(gets.to_i){|i|($....i).one?{|f|i%f<$.}&&p(i)}

This uses the $. magic variable in place of numeric literals, since it starts off as 0 and is incremented when we call gets to read from standard input. We can then define a prime number as a number that has exactly one factor less than it ($....i means the range from 1 to i excluding i) to avoid erroneously printing 0 and 1.


答:
Barely, 0 bytes

```

```

That's right! If the Barely interpreter receives the empty program, then it just hangs. Normally, the code would be terminated with a ~ to separate it from input, so the interpreter keeps reading EOF and never runs anything. Tested on DOSBox v0.74 using input redirection.

Title: Shortest infinite loop producing no output

Body:
Your task is to create the shortest infinite loop!

The point of this challenge is to create an infinite loop producing no output, unlike its possible duplicate. The reason to this is because the code might be shorter if no output is given.

Rules

Each submission must be a full program.

You must create the shortest infinite loop.

Even if your program runs out of memory eventually, it is still accepted as long as it is running the whole time from the start to when it runs out of memory. Also when it runs out of memory, it should still not print anything to STDERR.

The program must take no input (however, reading from a file is allowed), and should not print anything to STDOUT. Output to a file is also forbidden.

The program must not write anything to STDERR.

Feel free to use a language (or language version) even if it's newer than this challenge.
-Note that there must be an interpreter so the submission can be tested. It is allowed (and even encouraged) to write this interpreter yourself for a previously unimplemented language. :D

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

This is not about finding the language with the shortest infinite loop program. This is about finding the shortest infinite loop program in every language. Therefore, I will not accept an answer.

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

There should be a website such as Wikipedia, Esolangs, or GitHub for the language. For example, if the language is CJam, then one could link to the site in the header like #[CJam](http://sourceforge.net/p/cjam/wiki/Home/), X bytes.

Standard loopholes are not allowed.

(I have taken some of these rules from Martin Büttner's "Hello World" challenge)

Please feel free to post in the comments to tell me how this challenge could be  improved.

Catalogue

This is a Stack Snippet which generates both an alphabetical catalogue of the used languages, and an overall leaderboard. To make sure your answer shows up, please start it with this Markdown header:

```<code># Language name, X bytes
</code>```

Obviously replacing Language name and X bytes with the proper items. If you want to link to the languages' website, use this template, as posted above:

```<code>#[Language name](http://link.to/the/language), X bytes
</code>```

Now, finally, here's the snippet: (Try pressing "Full page" for a better view.)

var QUESTION_ID=59347;var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";var COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk";var OVERRIDE_USER=41805;var answers=[],answers_hash,answer_ids,answer_page=1,more_answers=true,comment_page;function answersUrl(index){return"//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"//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}#answer-list{padding:10px;width:500px;float:left}#language-list{padding:10px;padding-right:40px;width:500px;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">

Shortest Solution by Language

Language	User	Score

Leaderboard

	Author	Language	Size

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

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

```

Body:
Barely, 0 bytes

That's right! If the Barely interpreter receives the empty program, then it just hangs. Normally, the code would be terminated with a ~ to separate it from input, so the interpreter keeps reading EOF and never runs anything. Tested on DOSBox v0.74 using input redirection.


答:
Octave, <s>47</s> 46 bytes

```<code>@(r){m=max(s=sum(r==max(r,0,2),1)),find(s==m)}
</code>```

This creates an anonymous function that automatically assigns itself to ans and can be run using ans([1 2 3; 4 5 6]). It returns a two-element cell array where the first element is the maximum number of maxima and the second is the 1-based index of the columns containing these maxima.

All test cases

Title: Maximum Maxima!

Body:
Octave, <s>47</s> 46 bytes

@(r){m=max(s=sum(r==max(r,0,2),1)),find(s==m)}

This creates an anonymous function that automatically assigns itself to ans and can be run using ans([1 2 3; 4 5 6]). It returns a two-element cell array where the first element is the maximum number of maxima and the second is the 1-based index of the columns containing these maxima.

All test cases


答:
MATL, 17 bytes

```<code>!tvX>!G=5#fFTT#XM
</code>```

Input is a 2D array, with rows separated by semicolons. So the inputs for the test cases are

```<code>[7 93; 69 35; 77  30]
[7 93; 69 35; 77  77]
[1 2 3 4; 5 6 7 8]
[16 2 3 13; 5 11 10 8; 9 7 6 12]
[1 1 1 1]
[25 6 13 25]
[1; 2; 3; 4]
[100]
</code>```

Output is: first the maximum amount of maxima, then one or more column indices.

Try it online!

Explanation

This uses a different approach from Suever's answer.

First a matrix of logical values (true and false)  is computed, where true indicates the presence of a row-maximum. Then the column indices of the true values are extracted into a vector. Finally, the mode of that vector is computed (maximum number of maxima), along with all values that are the most frequent (desired column indices).

```<code>!        % Implicit input. Transpose
tv       % Duplicate. Concatenate vertically. This forces next function (max)
         % to work along columns even if input is a row vector
X>       % Maximum of each column (gives row vector)
!        % Transpose into column vector
G        % Push input again
=        % Test for equality, with broadcast. Gives matrix of true and false
5#f      % Column indices of true values, as a column vector
FTT#XM   % Mode of that vector, and all values that occur maximum number of times
         % Implicit display
</code>```

Title: Maximum Maxima!

Body:
Inspired by this question and refined by Luis Mendo.

Challenge

Given a 2D matrix of integers, each row has a maximum value. One or more elements of each row will be equal to the maximum value of their respective row. Your goal is to determine which column(s) contain the most entries which are equal to their respective row's maximum value as well as the number of row-wise maxima found in these columns.

Input

The input will be a non-empty M x N matrix (M > 0 and N > 0) in whatever form is well-suited to your language of choice.

Output

Your program should return the index of each column containing the maximum number of row-wise maxima (either as separate values or a list). Either 0- or 1-based indexing can be used (specify in your description).

Your program should also return the number of maxima that were present in these columns (a single number).

The order/format of the output is flexible but should be explained in the text accompanying your answer.

Additional Information

All entries in the input matrix will be positive integers.

If the maximum value of a row is shared by multiple elements in that row, all
occurrences of that value count towards their columns' total.

If multiple columns contain the same number of maxima, you should return a list of all columns
which had this number of maxima.

An Example

Consider input

```<code> 7  93
69  35
77  30
</code>```

Row 1 has maxium 93, which occurs only once, namely at column 2. Row 2: occurs at column 1. Row 3: also at column 1. So the winner column is 1, with 2 maxima. Thus the output will be [1] [2]. If we change the input to

```<code> 7  93
69  35
77  77
</code>```

the output will be [1 2] [2], because both columns have 2 maxima.

Test Cases

```<code>input                 =>    output ( [1-based index array], [nMaxima] )
----------------------------------------------
 7  93
69  35                =>    [1], [2]
77  30

 7  93
69  35                =>    [1 2], [2]
77  77

1   2   3   4         =>    [4], [2]
5   6   7   8

16   2   3  13
 5  11  10   8        =>    [1  2  4], [1]
 9   7   6  12

 1   1   1   1        =>    [1  2  3  4], [1]

25   6  13  25        =>    [1  4], [1]

1
2
3                     =>    [1], [4]
4

100                   =>    [1], [1]
</code>```

Scoring

This is code-golf, the shortest code in bytes wins. Tiebreaker goes to the earlier answer.

Leaderboard

Below is a stack snippet for analyzing all entries.

var QUESTION_ID=80788,OVERRIDE_USER=51939;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:
MATL, 17 bytes

!tvX>!G=5#fFTT#XM

Input is a 2D array, with rows separated by semicolons. So the inputs for the test cases are

[7 93; 69 35; 77  30]
[7 93; 69 35; 77  77]
[1 2 3 4; 5 6 7 8]
[16 2 3 13; 5 11 10 8; 9 7 6 12]
[1 1 1 1]
[25 6 13 25]
[1; 2; 3; 4]
[100]

Output is: first the maximum amount of maxima, then one or more column indices.

Try it online!

Explanation

This uses a different approach from Suever's answer.

First a matrix of logical values (true and false)  is computed, where true indicates the presence of a row-maximum. Then the column indices of the true values are extracted into a vector. Finally, the mode of that vector is computed (maximum number of maxima), along with all values that are the most frequent (desired column indices).

!        % Implicit input. Transpose
tv       % Duplicate. Concatenate vertically. This forces next function (max)
         % to work along columns even if input is a row vector
X>       % Maximum of each column (gives row vector)
!        % Transpose into column vector
G        % Push input again
=        % Test for equality, with broadcast. Gives matrix of true and false
5#f      % Column indices of true values, as a column vector
FTT#XM   % Mode of that vector, and all values that occur maximum number of times
         % Implicit display


答:
CJam, <s>38</s> <s>35</s> 31 bytes

2 bytes fewer thanks to @FryAmTheEggMan, with help also from @quartata. Thanks also to @Dennis for removing 4 more bytes.

```<code>q~_::e>.f=:.+_:e>_@f{=U):Ua*~}p
</code>```

Input is of the form

```<code>[[7 93] [69 35] [77 77]]
</code>```

Output is an array of 1-based column indices and a number.

Try it online!

Title: Maximum Maxima!

Body:
CJam, <s>38</s> <s>35</s> 31 bytes

2 bytes fewer thanks to @FryAmTheEggMan, with help also from @quartata. Thanks also to @Dennis for removing 4 more bytes.

q~_::e>.f=:.+_:e>_@f{=U):Ua*~}p

Input is of the form

[[7 93] [69 35] [77 77]]

Output is an array of 1-based column indices and a number.

Try it online!


答:
Clojure, 171 bytes

```<code>(fn[w](let[f concat r reverse p(map #(f %(r %))(partition(count w)(for[x w y w :let[c(compare x y)]](if(neg? c)\-(if(pos? c)\|\ )))))](run! #(apply println %)(f p(r p)))))
</code>```

ungolfed:

```<code>(fn [w]
  (let [n (count w)
        a (for [x w y w
                :let [c (compare x y)]]
            (if (neg? c)
              \-
              (if (pos? c)
                \|
                \ )))
        p (map #(concat % (reverse %))(partition n a))
        p (concat p (reverse p))]
    (run! #(apply println %) p))))
</code>```

Title: Generate Wordenticons

Body:
Identicons are visual depictions of hash values, often made from symmetrical arrangements of geometric shapes. Your default Stack Exchange avatar is an identicon. This challenge is about creating "wordenticons", simple text-based versions of identicons that apply to strings of lowercase letters, i.e. words.

Challenge

Write a program or function that takes in a string S and outputs its wordenticon. S is guaranteed to be nonempty and only contain lowercase English letter characters a-z. You may optionally assume S has a trailing newline.

The wordenticon of S will be a square grid of text with side lengths 2*length(S) composed of spaces ( ), vertical bars, (|), and horizontal bars (―).

To generate the wordenticon of S, form a square grid where every column corresponds to a letter of S (in normal left-to-right reading order) and every row corresponds to a letter of S (in normal top-to-bottom reading order).

For example, if S is food our initial grid looks like

```<code> food
f....
o....
o....
d....
</code>```

where . is just a placeholder.

For every empty point (every .) in the grid:

If the column letter comes before the row letter alphabetically, replace the . with |.

If the column letter comes after the row letter alphabetically, replace the . with ―.

If the column and row letters are the same, replace the . with   (space).

Here is the food example after each of these steps:

Adding |'s:

```<code> food
f...|
o|..|
o|..|
d....
</code>```

Adding ―'s:

```<code> food
f.――|
o|..|
o|..|
d―――.
</code>```

Adding  's:

```<code> food
f ――|
o|  |
o|  |
d―――
</code>```

To complete the wordenticon, remove the superfluous row and column containing the words

```<code> ――|
|  |
|  |
―――
</code>```

then mirror the entire thing horizontally

```<code> ――||――
|  ||  |
|  ||  |
―――  ―――
</code>```

and finally mirror it again vertically

```<code> ――||――
|  ||  |
|  ||  |
―――  ―――
―――  ―――
|  ||  |
|  ||  |
 ――||――
</code>```

resulting in the 2*length(S) side length text grid that is the final wordenticon.

Examples

Here are some additional wordenticon examples. Note that different words can have identical wordenticons and some wordenticons can be completely made of spaces (unfortunately markdown does not want to render those).

```<code>food

 ――||――
|  ||  |
|  ||  |
―――  ―――
―――  ―――
|  ||  |
|  ||  |
 ――||――

mood

 ――||――
|  ||  |
|  ||  |
―――  ―――
―――  ―――
|  ||  |
|  ||  |
 ――||――

foof

 ――  ――
|  ||  |
|  ||  |
 ――  ――
 ――  ――
|  ||  |
|  ||  |
 ――  ――

fool

 ――――――
|  ||  |
|  ||  |
|――  ――|
|――  ――|
|  ||  |
|  ||  |
 ――――――

a [2*2 grid of spaces]

to

 ||
―  ―
―  ―
 ||

it

 ――
|  |
|  |
 ――

tt [4*4 grid of spaces]

abc

 ――――
| ―― |
||  ||
||  ||
| ―― |
 ――――

and

 ――――
| || |
|―  ―|
|―  ―|
| || |
 ――――

but

 ――――
| || |
|―  ―|
|―  ―|
| || |
 ――――

you

 ||||
― ―― ―
―|  |―
―|  |―
― ―― ―
 ||||

bob

 ―  ―
| || |
 ―  ―
 ―  ―
| || |
 ―  ―

cat

 |――|
― ―― ―
||  ||
||  ||
― ―― ―
 |――|

cart

 |――――|
― ―――― ―
|| ―― ||
|||  |||
|||  |||
|| ―― ||
― ―――― ―
 |――――|

todo

 ||||||
― |  | ―
―― ―― ――
― |  | ―
― |  | ―
―― ―― ――
― |  | ―
 ||||||

mice

 ||||||
― |||| ―
―― ―― ――
――|  |――
――|  |――
―― ―― ――
― |||| ―
 ||||||

zyxw

 ||||||
― |||| ―
―― || ――
―――  ―――
―――  ―――
―― || ――
― |||| ―
 ||||||

banana

 |―|―||―|―|
― ― ―  ― ― ―
|| | || | ||
― ― ―  ― ― ―
|| | || | ||
― ― ―  ― ― ―
― ― ―  ― ― ―
|| | || | ||
― ― ―  ― ― ―
|| | || | ||
― ― ―  ― ― ―
 |―|―||―|―|

codegolf

 ――――――――――――――
| ||| |||| ||| |
|― ―――――――――― ―|
|―| ―――――――― |―|
|―|| ――||―― ||―|
| ||| |||| ||| |
|―|||― || ―|||―|
|―||―――  ―――||―|
|―||―――  ―――||―|
|―|||― || ―|||―|
| ||| |||| ||| |
|―|| ――||―― ||―|
|―| ―――――――― |―|
|― ―――――――――― ―|
| ||| |||| ||| |
 ――――――――――――――

programming

 ―||―||||||||||||―||―
| || |||||||||||| || |
―― |―||||||||||||―| ――
――― ―|――――  ――――|― ―――
| || |||||||||||| || |
――――― ―――――――――― ―――――
―――|―|  |―||―|  |―|―――
―――|―|  |―||―|  |―|―――
―――|―|―― ―||― ――|―|―――
―――|―|||| || ||||―|―――
――― ―|――――  ――――|― ―――
――― ―|――――  ――――|― ―――
―――|―|||| || ||||―|―――
―――|―|―― ―||― ――|―|―――
―――|―|  |―||―|  |―|―――
―――|―|  |―||―|  |―|―――
――――― ―――――――――― ―――――
| || |||||||||||| || |
――― ―|――――  ――――|― ―――
―― |―||||||||||||―| ――
| || |||||||||||| || |
 ―||―||||||||||||―||―

abcdefghijklm

 ――――――――――――――――――――――――
| ―――――――――――――――――――――― |
|| ―――――――――――――――――――― ||
||| ―――――――――――――――――― |||
|||| ―――――――――――――――― ||||
||||| ―――――――――――――― |||||
|||||| ―――――――――――― ||||||
||||||| ―――――――――― |||||||
|||||||| ―――――――― ||||||||
||||||||| ―――――― |||||||||
|||||||||| ―――― ||||||||||
||||||||||| ―― |||||||||||
||||||||||||  ||||||||||||
||||||||||||  ||||||||||||
||||||||||| ―― |||||||||||
|||||||||| ―――― ||||||||||
||||||||| ―――――― |||||||||
|||||||| ―――――――― ||||||||
||||||| ―――――――――― |||||||
|||||| ―――――――――――― ||||||
||||| ―――――――――――――― |||||
|||| ―――――――――――――――― ||||
||| ―――――――――――――――――― |||
|| ―――――――――――――――――――― ||
| ―――――――――――――――――――――― |
 ―――――――――――――――――――――――― </code>```

Scoring

This is code-golf, the shortest code in bytes wins. Tiebreaker goes to the earlier answer.

Notes

Any instance of horizontal bar (―) in your code may be counted as 1 byte instead of the 3 UTF-8 bytes it actually takes up. (Up to ten instances.)

If desired you may use regular dashes (-) in place of horizontal bars (―).

Removing or adding trailing spaces in the lines of a wordenticon is not allowed (even if the shape remains unchanged). It should be an exact 2*length(S) side length text square.

The output wordenticon may optionally have a single trailing newline.

Body:
Clojure, 171 bytes

(fn[w](let[f concat r reverse p(map #(f %(r %))(partition(count w)(for[x w y w :let[c(compare x y)]](if(neg? c)\-(if(pos? c)\|\ )))))](run! #(apply println %)(f p(r p)))))

ungolfed:

(fn [w]
  (let [n (count w)
        a (for [x w y w
                :let [c (compare x y)]]
            (if (neg? c)
              \-
              (if (pos? c)
                \|
                \ )))
        p (map #(concat % (reverse %))(partition n a))
        p (concat p (reverse p))]
    (run! #(apply println %) p))))


答:
Desmos, 1 byte

```<code>x
</code>```

Graphs y=x forever.

Title: Shortest code to produce infinite output

Body:
Write the shortest code you can that produces an infinite output.

That's all. You code will only be disqualified if it stops producing output at some point. As always in code golf, the shortest code wins.

Here's a list of answers that I think are really clever, so they can get credit:

The comma is both code and data

Infinite errors (that counts)

Infinite warnings (that also counts)

What's Marbelous?

Leaderboard

var QUESTION_ID=13152,OVERRIDE_USER=8611;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:
Desmos, 1 byte

x

Graphs y=x forever.


答:
Perl 6, <s> 51 48 </s> 47 bytes

<s>.say for grep {!first $_%%*,[*]^.. .sqrt},[*]^..get</s>
<s>.say for grep {!first $_%%*,[*]^..^$_},[*]^..get</s>
.say for grep {!grep $_%%*,[*]^..^$_},[*]^..get```

<h3>Explanation:</h3>

<p><code>[*]</code> / <code>[*] ()</code> multiply all of the elements of an empty list, which results in <code>1</code>.</p>

<p><code>$_ %% *</code> is a WhateverCode that returns True if <code>$_</code> is divisible by its only argument.</p>

<pre class="lang-perl6 prettyprint-override"><code>.say   # call the .say method on:
for    # every value from:
  grep # only those that match:

    {  # bare block with $_ for parameter
       # ( this block returns True when the value is prime )
      !          # negate: ( True for Nil, False for a number )

      first      # return the first value that is
        $_ %% *, # divisible by one of the following

        # ｢2 .. $_.sqrt.floor｣

        [*]      # 1
        ^..      # Range that ignores the first value
        .sqrt    # the square root of the value we are checking for primality
    },

    # ｢2 .. get｣

    [*]         # 1
    ^..         # Range that ignores the first value
    get         # read a line from $*IN
</code>```

The 48 byte example tests against a Range that is from 1 up to the value to check for primality, excluding both end points.

That will run slower as the prime numbers increase, as it checks against all values up to the square root of the number it is testing. It will be more performant if you cache the primes as you go, and only test against them.

( There may be a point where the previous code will be more performant if you run out of memory, and it has to page the cache out to disk )

my @p;.say for grep {push @p,$_ if !first $_%%*,@p},([*])^..get
```

<hr>

<p>The normal way to write something that prints out primes would be:</p>

<pre class="lang-perl6 prettyprint-override"><code>.say for grep *.is-prime, 2..get
</code>```

( I would probably use @*ARGS[0] instead of get so that it gets input from the command line instead of STDIN )

Title: Illiteral Prime numbers

Body:
Your challenge is to write a program (full program, not a function), that will take an integer and output all prime numbers up to (including) the given integer. Output is any readable list containing all integer primes (array, string, 1 prime per line, whatever you want) and must run to stdout or equivalent.

Simple? Here's the twist:

You may not use literals in your program. These include:

Literal numbers (0 through 9)

Literal strings (in quotes)

You may not use built in prime checks

EDIT: A prime check is a built in function that

Returns if a number is a prime number

Returns a prime number

Returns a list of prime numbers

You may code your own functions that do the above

Prime factorisation functions are allowed

As this is code-golf, shortest answer in bytes wins

Body:
Perl 6, <s> 51 48 </s> 47 bytes

<s>.say for grep {!first $_%%*,[*]^.. .sqrt},[*]^..get</s>
<s>.say for grep {!first $_%%*,[*]^..^$_},[*]^..get</s>
.say for grep {!grep $_%%*,[*]^..^$_},[*]^..get

Explanation:

[*] / [*] () multiply all of the elements of an empty list, which results in 1.

$_ %% * is a WhateverCode that returns True if $_ is divisible by its only argument.

.say   # call the .say method on:
for    # every value from:
  grep # only those that match:

    {  # bare block with $_ for parameter
       # ( this block returns True when the value is prime )
      !          # negate: ( True for Nil, False for a number )

      first      # return the first value that is
        $_ %% *, # divisible by one of the following

        # ｢2 .. $_.sqrt.floor｣

        [*]      # 1
        ^..      # Range that ignores the first value
        .sqrt    # the square root of the value we are checking for primality
    },

    # ｢2 .. get｣

    [*]         # 1
    ^..         # Range that ignores the first value
    get         # read a line from $*IN

The 48 byte example tests against a Range that is from 1 up to the value to check for primality, excluding both end points.

That will run slower as the prime numbers increase, as it checks against all values up to the square root of the number it is testing. It will be more performant if you cache the primes as you go, and only test against them.

( There may be a point where the previous code will be more performant if you run out of memory, and it has to page the cache out to disk )

my @p;.say for grep {push @p,$_ if !first $_%%*,@p},([*])^..get

The normal way to write something that prints out primes would be:

.say for grep *.is-prime, 2..get

( I would probably use @*ARGS[0] instead of get so that it gets input from the command line instead of STDIN )


问:
The Nine Pattern

Introduction

I stumbled across this (useless) pattern the other day while I was watching TV.
I named it "the 9 pattern" because the first number to use it was 9.
The gist of it is, you enter a number (let's say x), and then you get back:

x

x + (x / 3) [let's call this y]

two-thirds of y [let's call this z]

z + 1

So, if I put inside this pattern the number 9 as x, this is what would come out:

9 (9)

12 (9 + 9 / 3) [9 over 3 is 3, and 9 + 3 is 12]

8 (12 times two-thirds) [a third of 12 is 4, and 4 * 2 is 8]

9 (8 + 1 is 9)

Challenge

Write me a function (in any programming language) that takes in a number, and outputs an integer array using the pattern.

Somewhat like this psuedo-code:

```<code>function ninePattern(int myInt) returns IntegerArray {
    int iterationA = myInt + (myInt / 3);
    int iterationB = iterationA * (2 / 3);
    int iterationC = iterationB + 1;
    IntegerArray x = [myInt, iterationA, iterationB, iterationC];
    return x;
}
</code>```

Clarifications

Discussions have been arousing in comments regarding the specifications of the question. This section is meant to clarify some of those.

"better to count in bytes than characters"

I picked characters because (for me, at least) it would be easier to judge. Of course, I can't change that now. (lots of answers are already posted)

"rounding"

Rounding follows this rhyme:

If it's 5 or more, raise the score

  If it's 4 or less, let it rest

Simply, put, if it is something like 4.7 or 3.85, round them to 5 and 4 respectively.

Examples

```<code>Input => Result
9 => [9, 12, 8, 9]
8 => [8, 11, 7, 8]
6 => [6, 8, 5, 6]
23 => [23, 31, 21, 22]
159 => [159, 212, 141, 142]
</code>```

If, however, the numbers are something like 2.3 or 10.435446, round them to 2 and 10 respectively.

"language support"

You are free to not use functions and/or arrays IF AND ONLY IF the language of your choice does not support them.  If it does (even if it will increase your characters count), you must use them.

答:
CJam, 21 bytes

```<code>qi__3d/+mo_2d3/*i_)]`
</code>```

Feedback is welcome

Explanation

qi__ - Read the input as an integer and duplicate it twice

3D/+mo - Divide one instance of the input by 3, then add it to the second instance to make y

_2d3/*i - Duplicate y, then multiply it by .6

_)]` -  Dupe, increment, wrap in array, print as array (not in code because of the ` operator :( )

Edit: Forgot to make the first three a double, so the program was broken. Fixed.

Title: The Nine Pattern

Body:
CJam, 21 bytes

qi__3d/+mo_2d3/*i_)]`

Feedback is welcome

Explanation

qi__ - Read the input as an integer and duplicate it twice

3D/+mo - Divide one instance of the input by 3, then add it to the second instance to make y

_2d3/*i - Duplicate y, then multiply it by .6

_)]` -  Dupe, increment, wrap in array, print as array (not in code because of the ` operator :( )

Edit: Forgot to make the first three a double, so the program was broken. Fixed.


问:
Evolution of "Hello World!"
This contest is officially over, the winner is jimmy23013. Congratulations!

The challenge is to make a program that prints Hello World! to stdout. The catch is that your program must have a Levenshtein distance of 7 or less from the program in the answer submitted before yours.

How This Will Work

Below I have already submitted the first answer using Python: print("Hello World!").

The next person to answer must modify the string print("Hello World!") with up to 7 single character insertions, deletions, or substitutions so that when it is run in any language that hasn't been used so far (only Python in this case) the output is still Hello World!.

For example the second answerer might use 1 substitution (r -> u), 2 deletions (in), and 1 insertion (s) to make the string puts("Hello World!") which prints Hello World! when run in Ruby.

The third person to answer must do the same thing in a new language, but using the program of the second person's answer (e.g. puts("Hello World!")) as their starting point. The fourth answer will be in relation to the third answer and so on.

This will continue on until everyone get stuck because there is no new language the last answer's program can be made to run in by only changing 7 characters. The communal goal is to see how long we can keep this up, so try not to make any obscure or unwarranted  character edits (this is not a requirement however).

Formatting

Please format your post like this:

```<code># Answer N - [language]

    [code]

[notes, explanation, observations, whatever]
</code>```

Where N is the answer number (increases incrementally, N = 1, 2, 3,...).

You do not have to tell which exact characters were changed. Just make sure the Levenshtein distance is from 0 to 7.

Rules

The key thing to understand about this challenge is that only one person can answer at a time and each answer depends on the one before it.

There should never be two answers with the same N. If two people happen to simultaneously  answer for some N, the one who answered later (even if it's a few seconds difference) should graciously delete their answer.

Furthermore...

A user may only submit one answer per 8 hour period. i.e. Each of your answers must be at least 8 hours apart. (This is to prevent users from constantly watching the question and answering as much as possible.)

A user may not submit two answers in a row.  (e.g. since I submitted answer 1 I can't do answer 2, but I could do 3.)

Each answer must be in a different programming language.

Different versions of the same language count as the same language.

Languages count as distinct if they are traditionally called by two different names. (There may be some ambiguities here but don't let that ruin the contest.)

You may only use tabs, newlines, and printable ASCII. (Newlines count as one character.)

The output should only be Hello World! and no other characters (a leading/trailing newline is not an issue).

If your language doesn't has stdout use whatever is commonly used for quickly outputting text (e.g. console.log or alert in JavaScript).

Please make sure your answer is valid. We don't want to realize there's a break in the chain five answers up. Invalid answers should be fixed quickly or deleted before there are additional answers.

Don't edit answers unless absolutely necessary.

Scoring

Once things settle down, the user who submits the most (valid) answers wins. Ties go to the user with the most cumulative up-votes.

Leaderboard: (out of date)

(user must have at least 2 valid answers)

11 Answers

Optimizer - CJam, Groovy, HTML, Forth, Rebol, Markdown, CASIO BASIC, SpeakEasy, REXX, RegXy, Pawn

jimmy23013 - GNU dc, Zsh, Burlesque, bc, Hack, GDB, QBasic, MediaWiki Markup, itflabtijtslwi, Squirrel, AGOL 68

7 Answers

Nit - APL, Clipper, Falcon, MUMPS, FreeBASIC, csh, Dart

Timmy - Lua, Lisp, Oz, Algoid, KTurtle, Alice, OCaml

6 Answers

Stacey - VHDL, GNU Octave, M4, Logo, Microsoft Batch, Matlab

Dennis - Dash, tcsh, TeX, ///, HQ9+-, Alore

5 Answers

plannapus - Stata, Scheme, SQLite, Scala, Suneido

Pietu1998 - PHP, sh, ALAGUF, Cardinal, Grin

4 Answers

ypnypn - NetLogo, Mouse, Salmon, Maple

resueman - Clojure, Emacs Lisp, Vimscript, VBScript

Timtech - AutoLisp, Geom++, BogusForth, owl

3 Answers

BrunoJ - CoffeeScript, F#, Betterave

2 Answers

Mig - Extended BF Type III, TCL

Calvin's Hobbies - Python, E

Sp3000 - Racket, Pyth

grc - Haskell, Turing

es1024 - Nimrod, ksh

FireFly -  FALSE, mIRC script

g-rocket - AppleScript, LiveCode

Oriol - AMPL, PARI/GP

nneonneo - Boo, Caché ObjectScript

Languages used so far:

Python

CJam

PHP

Pyth

Perl

Befunge 98

Bash

Nimrod

Ruby

GNU dc

Golfscript

Mathematica

R

Lua

Sage

Julia

Scilab

JavaScript

VHDL

HyperTalk

Haskell

LOLCODE

APL

M30W

Stata

TI-BASIC (NSpire)

ActionScript 2

J

PowerShell

K

Visual FoxPro

VBA

Extended BF Type III

Zsh

Dash

Clojure

NetLogo

Groovy

CoffeeScript

Clipper

B.A.S.I.C.

FALSE

fish (shell)

GNU Octave

TCL

E

newLisp

Lisp

SMT-LIBv2

Racket

Batsh

tcsh

AppleScript

Mouse

Pixie

F#

Falcon

Burlesque

HTML

SGML

M4

MUMPS

TeX

Forth

Salmon

Turing

bc

Betterave

Scheme

Emacs Lisp

Logo

AutoLISP

///

Rebol

Maple

FreeBASIC

Vimscript

ksh

Hack

mIRC

Batch

Make

Markdown

sh

GDB

csh

HQ9+-

Postscript

Matlab

Oz

CASIO BASIC

VBScript

QBasic

Processing

C

Rust 0.13

Dart

Kaffeine

Algoid

AMPL

Alore

Forobj

T-SQL

LiveCode

Euphoria

SpeakEasy

MediaWiki

SmallBASIC

REXX

SQLite

TPP

Geom++

SQL (postgres)

itflabtijtslwi

RegXy

Opal.rb

Squirrel

Pawn

Scala

Rebmu

Boo

PARI/GP

Red

Swift

BeanShell

Vala

Pike

Suneido

AWK

Neko

AngelScript

gosu

V

ALAGUF

BogusForth

Flaming Thunder

Caché ObjectScript

owl

Cardinal

Parser

Grin

Kitten

TwoDucks

Asymptote

CAT

IDL

Tiny

WTFZOMFG

Io

MuPAD

Java

Onyx

JBoss

S+

Hexish

yash

Improbable

wake

brat

busybox built-in shell

gammaplex

KTurtle

AGOL 68

Alice

SML/NJ

OCaml

CDuce

Underload

Simplex v.0.6

Minkolang 0.9

Fexl 7.0.3

Jolf

Vitsy

Y

Retina

Codename Dragon

Seriously

Reng v.3.3

Fuzzy Octo Guacamole

05AB1E

(Feel free to edit these lists if they are incorrect or out of date.)

This question works best when you sort by oldest.

NOTE: This is a trial question for a new challenge type I have in mind where each answer depends on the last and increases in difficulty. Come discuss it with us in the chatroom for this question or in meta.

答:
Answer 178 - Reng v.3.3

```<code>^.`4mrZ"#03w(*#class jux!{public static void main(String[] h){#\
#System.Console.Writeln(//@\//Hello*}}print,cat<<#*)\
put"

^
<isp~;ob"Hello World!")
gx`#(O)X.g!)S(#X` ;}}//printputs;//-##E;]bye</>#*)`kX
</code>```

Distance 7 from Answer 177. Changes:

H → ^ (1)

d → < (2)

inserting ~;ob (6)

removing the final newline (7)

Here is the code passed over:

```<code>^

<   ~;ob"Hello World!")
g
</code>```

g and ) are no-ops. Otherwise, this is a pretty standard HW submission. Try it here!

Title: Evolution of "Hello World!"

Body:
Answer 178 - Reng v.3.3

^.`4mrZ"#03w(*#class jux!{public static void main(String[] h){#\
#System.Console.Writeln(//@\//Hello*}}print,cat<<#*)\
put"

^
<isp~;ob"Hello World!")
gx`#(O)X.g!)S(#X` ;}}//printputs;//-##E;]bye</>#*)`kX

Distance 7 from Answer 177. Changes:

H → ^ (1)

d → < (2)

inserting ~;ob (6)

removing the final newline (7)

Here is the code passed over:

^

<   ~;ob"Hello World!")
g

g and ) are no-ops. Otherwise, this is a pretty standard HW submission. Try it here!