Leave your mark!

3

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.

Ypnypn

Posted 2014-10-30T23:54:20.340

Reputation: 10 485

1There is no rule against answering multiple times in a row? – feersum – 2014-10-31T00:10:31.767

@feersum Correct. – Ypnypn – 2014-10-31T00:11:27.723

@MartinBüttner Then you'll lose 20% of your score. – Ypnypn – 2014-10-31T00:13:56.713

@MartinBüttner Do you think that's really the best strategy? – Ypnypn – 2014-10-31T00:18:48.380

1@MartinBüttner Fine, you win. – Ypnypn – 2014-10-31T00:23:59.530

1The definition of mark longevity should be changed to the difference between answer numbers. Otherwise all scores can be 0. – feersum – 2014-10-31T01:26:54.137

Agree. As of now every answer has removed the previous mark (and all scores except the latest are 0). It doesn't make sense not to change it, since it only costs one char more at most, and you effectively erase the last entry from scoring (except for a 5% penalty to their next answer, which will probably end up a 0 anyway ;). – Geobits – 2014-10-31T02:09:18.863

1@Geobits The latest answer always scores 0 (under either definition). – feersum – 2014-10-31T02:15:55.620

1@feersum A strange game. The only winning move is not to play. – Geobits – 2014-10-31T02:19:12.580

Answers

4

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.

Martin Ender

Posted 2014-10-30T23:54:20.340

Reputation: 184 808

Verified; works. – Ypnypn – 2014-10-31T00:13:18.983

3

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)  

feersum

Posted 2014-10-30T23:54:20.340

Reputation: 29 566

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.) – NinjaBearMonkey – 2014-10-31T02:09:56.280

@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.

– feersum – 2014-10-31T02:26:40.803

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.

– NinjaBearMonkey – 2014-10-31T02:34:34.077

1

@hsl The other Deadfish interpreter on the same page works better. Make sure to uncheck the 'ASCII/Unicode' box.

– feersum – 2014-10-31T02:46:02.133

2

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.

Geobits

Posted 2014-10-30T23:54:20.340

Reputation: 19 061

Verified this one. – NinjaBearMonkey – 2014-10-31T00:47:09.777

2

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 ;

Optimizer

Posted 2014-10-30T23:54:20.340

Reputation: 25 836

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. – None – 2014-10-31T19:01:37.697

1

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.)

NinjaBearMonkey

Posted 2014-10-30T23:54:20.340

Reputation: 9 925

I think it works. – None – 2014-10-31T02:05:14.290

3Actually it is invalid ... one of the lines has 11 characters. – feersum – 2014-10-31T02:09:43.443

It should be fixed now. – NinjaBearMonkey – 2014-10-31T02:21:29.683

1

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.

jimmy23013

Posted 2014-10-30T23:54:20.340

Reputation: 34 042

4This question is stupid. Makes the user easily go an extra mile to remove the previous mark. I vote to close it. – Optimizer – 2014-11-01T05:25:56.900

0

Answer 1, Java

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

Ypnypn

Posted 2014-10-30T23:54:20.340

Reputation: 10 485

Shouldn't you have specified a mark in the first answer? – FireFly – 2014-10-31T09:09:03.610

2@FireFly I don't think it's fair to let myself get points for a mark, since I got to make the whole grid. – Ypnypn – 2014-10-31T13:51:29.617