Write two programs, each taking a string
s and a number
n ≥ 0, such that:
- The first program prints
ntimes, separated by newlines.
- The second program prints each character of
ntimes, with repeated characters separated by newlines.
- Every character at column
yin one program equals the character at column
xin the other program.
Both programs must contain at least two lines. You may take input in any reasonable order or format that works for both programs.
This is code-golf; the less bytes, the better. Count bytes from your longer program (that is, the one with more lines than columns).
Here's an example in a hypothetical programming language, with
"Hello, world!" and
a(b*c defg h.ij)
Hello, world! Hello, world! Hello, world!
adh (e. bfi *gj c )
HHH eee lll lll ooo ,,, www ooo rrr lll ddd !!!