Skip to main content
Commonmark migration
Source Link

#Sed

Sed

As sed doesn't have functions, submissions will be complete programs, with input and output via the standard streams.

##Programs with no input

Programs with no input

Sometimes a question asks only for output, and doesn't specify providing any input. Because sed is incapable of producing any output unless there's at least one line of input, you should assume in these cases that the input consists of a single newline character.

Scoring

##Scoring ProgramsPrograms are normally in single-byte character encodings, so counting characters is generally sufficient. Interpreter flags need to be added, as normal; for example, +1 if your program requires -r.

Numeric I/O

##Numeric I/O UnaryUnary is the most useful numeric format for sed, if the question doesn't specifically bar that. It is possible to use sed for arithmetic; although it's unlikely to win any , it's certainly an entertaining challenge!

Tips

##Tips SeeSee tips on the main site.

#Sed

As sed doesn't have functions, submissions will be complete programs, with input and output via the standard streams.

##Programs with no input

Sometimes a question asks only for output, and doesn't specify providing any input. Because sed is incapable of producing any output unless there's at least one line of input, you should assume in these cases that the input consists of a single newline character.

##Scoring Programs are normally in single-byte character encodings, so counting characters is generally sufficient. Interpreter flags need to be added, as normal; for example, +1 if your program requires -r.

##Numeric I/O Unary is the most useful numeric format for sed, if the question doesn't specifically bar that. It is possible to use sed for arithmetic; although it's unlikely to win any , it's certainly an entertaining challenge!

##Tips See tips on the main site.

Sed

As sed doesn't have functions, submissions will be complete programs, with input and output via the standard streams.

Programs with no input

Sometimes a question asks only for output, and doesn't specify providing any input. Because sed is incapable of producing any output unless there's at least one line of input, you should assume in these cases that the input consists of a single newline character.

Scoring

Programs are normally in single-byte character encodings, so counting characters is generally sufficient. Interpreter flags need to be added, as normal; for example, +1 if your program requires -r.

Numeric I/O

Unary is the most useful numeric format for sed, if the question doesn't specifically bar that. It is possible to use sed for arithmetic; although it's unlikely to win any , it's certainly an entertaining challenge!

Tips

See tips on the main site.

sed's newline rule should definitely be mentioned here
Source Link
user62131
user62131

#Sed

As sed doesn't have functions, submissions will be complete programs, with input and output via the standard streams.

##Programs with no input

Sometimes a question asks only for output, and doesn't specify providing any input. Because sed is incapable of producing any output unless there's at least one line of input, you should assume in these cases that the input consists of a single newline character.

##Scoring Programs are normally in single-byte character encodings, so counting characters is generally sufficient. Interpreter flags need to be added, as normal; for example, +1 if your program requires -r.

##Numeric I/O Unary is the most useful numeric format for sed, if the question doesn't specifically bar that. It is possible to use sed for arithmetic; although it's unlikely to win any , it's certainly an entertaining challenge!

##Tips See tips on the main site.

#Sed

As sed doesn't have functions, submissions will be complete programs, with input and output via the standard streams.

##Scoring Programs are normally in single-byte character encodings, so counting characters is generally sufficient. Interpreter flags need to be added, as normal; for example, +1 if your program requires -r.

##Numeric I/O Unary is the most useful numeric format for sed, if the question doesn't specifically bar that. It is possible to use sed for arithmetic; although it's unlikely to win any , it's certainly an entertaining challenge!

##Tips See tips on the main site.

#Sed

As sed doesn't have functions, submissions will be complete programs, with input and output via the standard streams.

##Programs with no input

Sometimes a question asks only for output, and doesn't specify providing any input. Because sed is incapable of producing any output unless there's at least one line of input, you should assume in these cases that the input consists of a single newline character.

##Scoring Programs are normally in single-byte character encodings, so counting characters is generally sufficient. Interpreter flags need to be added, as normal; for example, +1 if your program requires -r.

##Numeric I/O Unary is the most useful numeric format for sed, if the question doesn't specifically bar that. It is possible to use sed for arithmetic; although it's unlikely to win any , it's certainly an entertaining challenge!

##Tips See tips on the main site.

Source Link
Toby Speight
  • 6.5k
  • 10
  • 11

#Sed

As sed doesn't have functions, submissions will be complete programs, with input and output via the standard streams.

##Scoring Programs are normally in single-byte character encodings, so counting characters is generally sufficient. Interpreter flags need to be added, as normal; for example, +1 if your program requires -r.

##Numeric I/O Unary is the most useful numeric format for sed, if the question doesn't specifically bar that. It is possible to use sed for arithmetic; although it's unlikely to win any , it's certainly an entertaining challenge!

##Tips See tips on the main site.

Post Made Community Wiki by Toby Speight