Skip to main content
Commonmark migration
Source Link

#Fill to the line!

Fill to the line!

Given input consisting of the characters _, , and newline, fill the empty space up to the line!

Example:

I will use # as the filler character in the example.

1. Input
        
        
________
        
        
        
2. Fill up to the line, but not above.
        
        
________
########
########
########
  • You may assume that the input either is rectangular (is padded), or consists only of the line and newlines.
  • You may assume that there is only one straight, unbroken line.
  • The whitespace above the line is part of the input. Do not fill above the line.

Test cases:

"
Input
"
"
Output
"
**********

"
    
    
    
----
    
    
    
    
"
"
    
    
    
----
####
####
####
####
"

**********

"
        
        
________
        
        
        
"
"
        
        
________
########
########
########
"

#Fill to the line!

Given input consisting of the characters _, , and newline, fill the empty space up to the line!

Example:

I will use # as the filler character in the example.

1. Input
        
        
________
        
        
        
2. Fill up to the line, but not above.
        
        
________
########
########
########
  • You may assume that the input either is rectangular (is padded), or consists only of the line and newlines.
  • You may assume that there is only one straight, unbroken line.
  • The whitespace above the line is part of the input. Do not fill above the line.

Test cases:

"
Input
"
"
Output
"
**********

"
    
    
    
----
    
    
    
    
"
"
    
    
    
----
####
####
####
####
"

**********

"
        
        
________
        
        
        
"
"
        
        
________
########
########
########
"

Fill to the line!

Given input consisting of the characters _, , and newline, fill the empty space up to the line!

Example:

I will use # as the filler character in the example.

1. Input
        
        
________
        
        
        
2. Fill up to the line, but not above.
        
        
________
########
########
########
  • You may assume that the input either is rectangular (is padded), or consists only of the line and newlines.
  • You may assume that there is only one straight, unbroken line.
  • The whitespace above the line is part of the input. Do not fill above the line.

Test cases:

"
Input
"
"
Output
"
**********

"
    
    
    
----
    
    
    
    
"
"
    
    
    
----
####
####
####
####
"

**********

"
        
        
________
        
        
        
"
"
        
        
________
########
########
########
"
added test cases
Source Link
sporkl
  • 6.9k
  • 8
  • 11

#Fill to the line!

Given input consisting of the characters _, , and newline, fill the empty space up to the line!

Example:

I will use # as the filler character in the example.

1. Input
        
        
________
        
        
        
2. Fill up to the line, but not above.
        
        
________
########
########
########
  • You may assume that the input either is rectangular (is padded), or consists only of the line and newlines.
  • You may assume that there is only one straight, unbroken line.
  • The whitespace above the line is part of the input. Do not fill above the line.

Test cases coming soon.Test cases:

"
Input
"
"
Output
"
**********

"
    
    
    
----
    
    
    
    
"
"
    
    
    
----
####
####
####
####
"

**********

"
        
        
________
        
        
        
"
"
        
        
________
########
########
########
"

#Fill to the line!

Given input consisting of the characters _, , and newline, fill the empty space up to the line!

Example:

I will use # as the filler character in the example.

1. Input
        
        
________
        
        
        
2. Fill up to the line, but not above.
        
        
________
########
########
########
  • You may assume that the input either is rectangular (is padded), or consists only of the line and newlines.
  • You may assume that there is only one straight, unbroken line.
  • The whitespace above the line is part of the input. Do not fill above the line.

Test cases coming soon.

#Fill to the line!

Given input consisting of the characters _, , and newline, fill the empty space up to the line!

Example:

I will use # as the filler character in the example.

1. Input
        
        
________
        
        
        
2. Fill up to the line, but not above.
        
        
________
########
########
########
  • You may assume that the input either is rectangular (is padded), or consists only of the line and newlines.
  • You may assume that there is only one straight, unbroken line.
  • The whitespace above the line is part of the input. Do not fill above the line.

Test cases:

"
Input
"
"
Output
"
**********

"
    
    
    
----
    
    
    
    
"
"
    
    
    
----
####
####
####
####
"

**********

"
        
        
________
        
        
        
"
"
        
        
________
########
########
########
"
added 83 characters in body
Source Link
sporkl
  • 6.9k
  • 8
  • 11

#Fill to the line!

Given input consisting of the characters _, , and newline, fill the empty space up to the line!

Example:

I will use # as the filler character in the example.

1. Input
        
        
________
        
        
        
2. Fill up to the line, but not above.
        
        
________
########
########
########
  • You may assume that the input either is rectangular (is padded), or consists only of the line and newlines.
  • You may assume that there is only one straight, unbroken line.
  • The whitespace above the line is part of the input. Do not fill above the line.

Test cases coming soon.

#Fill to the line!

Given input consisting of the characters _, , and newline, fill the empty space up to the line!

Example:

I will use # as the filler character in the example.

1. Input
        
        
________
        
        
        
2. Fill up to the line, but not above.
        
        
________
########
########
########
  • You may assume that the input either is rectangular (is padded), or consists only of the line and newlines.
  • You may assume that there is only one straight, unbroken line.

Test cases coming soon.

#Fill to the line!

Given input consisting of the characters _, , and newline, fill the empty space up to the line!

Example:

I will use # as the filler character in the example.

1. Input
        
        
________
        
        
        
2. Fill up to the line, but not above.
        
        
________
########
########
########
  • You may assume that the input either is rectangular (is padded), or consists only of the line and newlines.
  • You may assume that there is only one straight, unbroken line.
  • The whitespace above the line is part of the input. Do not fill above the line.

Test cases coming soon.

added 1 character in body
Source Link
sporkl
  • 6.9k
  • 8
  • 11
Loading
clarified
Source Link
sporkl
  • 6.9k
  • 8
  • 11
Loading
Source Link
sporkl
  • 6.9k
  • 8
  • 11
Loading