3
\$\begingroup\$

In this challenge, you'll need to edit a grid of characters to make a program that does a task, while ensuring that you leave a lasting mark on the grid.

Task

The task to perform is determined by when you answer. Specifically, for the nth answer, divide n by 5, and if the remainder is...

  • 0. Read a positive integer from STDIN (or closest alternative) and print its square.
  • 1. Print the value of n9-n8+n7-...-n2+n-1.
  • 2. Read a string from STDIN (or closest alternative) and print it, reversed.
  • 3. Print the name of the language being used.
  • 4. Print the first 99 Fibonacci numbers, with some delimiter.

In all cases, "print" means to STDOUT or closest alternative. Leading or trailing whitespace is okay. A full program is required, not just a function.

Answering (please read before posting)

This is a "sequential answering" challenge. Answers have a specific order. If the previous answer, chronologically, was titled Answer n, your answer should be titled Answer n+1.

All answers are 100 characters (in printable ASCII) long, divided into ten rows. Each row is separated by a newline. I have already posted the first answer.

Once an answer has been verified by another user (in a comment), any user, except for the one who gave the previous answer, can submit the next answer, pursuant to the following rules:

For each answer after the first, change at least one character (but not newlines) in the previous answer to another printable ASCII character achieve the correct task. You may not add, remove, or move any characters. You may use any language with a readily available compiler or interpreter.

Furthermore, you must specify one character you changed to be your "mark". You want to maximize the longevity of your mark. If your mark is first changed by the answer five after yours, its lifespan is 4 (four other answers left it untouched). If no one ever removes your mark, then the lifespan is the total number of other answers after it.

If you answer multiple times, you may have multiple existing marks at once.

If your answer is found incorrect, please delete it if there are no subsequent valid answers. Otherwise, do not delete or change your answers.

Scoring

Your score is the sum of your marks' longevities, divided by the total number of characters you changed. Subtract 5% from your score for each answer past the first.

For example, suppose I answer three times. First with 5 changes and a mark longevity of 3, then 4 changes and 20, then 1 change and a longevity of 7. My score is now ((3 + 20 + 7) / (5 + 4 + 1)) * (100% - 10%) = 2.7.

\$\endgroup\$
  • 1
    \$\begingroup\$ There is no rule against answering multiple times in a row? \$\endgroup\$ – feersum Oct 31 '14 at 0:10
  • 1
    \$\begingroup\$ @MartinBüttner Fine, you win. \$\endgroup\$ – Ypnypn Oct 31 '14 at 0:23
  • 1
    \$\begingroup\$ The definition of mark longevity should be changed to the difference between answer numbers. Otherwise all scores can be 0. \$\endgroup\$ – feersum Oct 31 '14 at 1:26
  • 1
    \$\begingroup\$ @Geobits The latest answer always scores 0 (under either definition). \$\endgroup\$ – feersum Oct 31 '14 at 2:15
  • 1
    \$\begingroup\$ @feersum A strange game. The only winning move is not to play. \$\endgroup\$ – Geobits Oct 31 '14 at 2:19
4
\$\begingroup\$

Answer 2, CJam, 6 changed

"lass Fun{
 public   
  static  
void main(
 String[] 
args) {   
System.out
.print(0);
  }       
}";lW%    

The mark is the ; in the last line.

Test it here.

\$\endgroup\$
  • \$\begingroup\$ Verified; works. \$\endgroup\$ – Ypnypn Oct 31 '14 at 0:13
3
\$\begingroup\$

Answer 5, Deadfish, changes 4

Deadfish has no input, thus the closest alternative to STDIN is that the number is already stored in the counter. Note that the language can't handle numbers over 255, so the "input" must be between 0 and 15 inclusive.

The j in statjc is the mark.

 var  Fun,
 publjc,  
  statjc, 
v=2;  f3r(
 S =[1,1];
v<99;){   
S[v]=S[v-1
]+S[v++-2]
  o       
alert(S)  
\$\endgroup\$
  • \$\begingroup\$ This should work in theory, although I haven't found a way to test it. (I changed S =[0,1]; to S =[1,1];, by the way, but it shouldn't affect your score.) \$\endgroup\$ – NinjaBearMonkey Oct 31 '14 at 2:09
  • \$\begingroup\$ @hsl Surely you can manage to run one of the 68 interpreters on the esolang page. But be warned many are deliberately broken in the spirit of the language. \$\endgroup\$ – feersum Oct 31 '14 at 2:26
  • \$\begingroup\$ I was actually using the Stack Snippet version, but I didn't see how to run it. This one's really simple because it just has an s and an o, though. \$\endgroup\$ – NinjaBearMonkey Oct 31 '14 at 2:34
  • 1
    \$\begingroup\$ @hsl The other Deadfish interpreter on the same page works better. Make sure to uncheck the 'ASCII/Unicode' box. \$\endgroup\$ – feersum Oct 31 '14 at 2:46
2
\$\begingroup\$

Answer 3, CJam, 8 changed

"lass Fun{
 public   
  static  
void main(
 String[] 
args) {   
System.out
.print(0);
  }       
";"CJam"  

Changed the mark (;) from Answer 2.

My mark is the second " on the last line.

Test it here.

\$\endgroup\$
  • \$\begingroup\$ Verified this one. \$\endgroup\$ – NinjaBearMonkey Oct 31 '14 at 0:47
2
\$\begingroup\$

Answer 6, CJam, changes 13

"var  Fun,
 publjc,  
";8638UY5"
v=2;  f3r(
 S =[1,1];
v<99;){   
S[v]=S[v-1
]+S[v++-2]
  o       
alert(S)";

Try it online here

My mark is the last ;

\$\endgroup\$
  • \$\begingroup\$ I wrote a program to test this, and I came up with the same answer. Word says it has 100 chars counting spaces and 10 lines, so I think it is good. \$\endgroup\$ – Hosch250 Oct 31 '14 at 19:01
1
\$\begingroup\$

Answer 4, JavaScript, 56 changed

 var  Fun,
 public,  
  static, 
v=2;  for(
 S =[1,1];
v<99;){   
S[v]=S[v-1
]+S[v++-2]
  }       
alert(S)  

Removed the previous mark. My mark is the } in the second-to-last line. Unfortunately, JavaScript rounds the really big FIbonacci numbers, but I think it works. (Note that there should be a leading space and 2 trailing spaces that are automatically removed.)

\$\endgroup\$
  • \$\begingroup\$ I think it works. \$\endgroup\$ – Hosch250 Oct 31 '14 at 2:05
  • 3
    \$\begingroup\$ Actually it is invalid ... one of the lines has 11 characters. \$\endgroup\$ – feersum Oct 31 '14 at 2:09
  • \$\begingroup\$ It should be fixed now. \$\endgroup\$ – NinjaBearMonkey Oct 31 '14 at 2:21
1
\$\begingroup\$

Answer 7, ><>, changes 14

i:0(  !#?^
 publjc,  
";8638UY5o
v=2;  f3r:
 S =[1,1];
v<99;){  !
S[v]=S[v-?
]+S[v++-2l
  o       
alert(S)"~

My mark is the # on the first line.

\$\endgroup\$
  • 4
    \$\begingroup\$ This question is stupid. Makes the user easily go an extra mile to remove the previous mark. I vote to close it. \$\endgroup\$ – Optimizer Nov 1 '14 at 5:25
0
\$\begingroup\$

Answer 1, Java

class Fun{
 public   
  static  
void main(
 String[] 
args) {   
System.out
.print(0);
  }       
}         
\$\endgroup\$
  • \$\begingroup\$ Shouldn't you have specified a mark in the first answer? \$\endgroup\$ – FireFly Oct 31 '14 at 9:09
  • 2
    \$\begingroup\$ @FireFly I don't think it's fair to let myself get points for a mark, since I got to make the whole grid. \$\endgroup\$ – Ypnypn Oct 31 '14 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.