3 added 397 characters in body
source | link

Python 2, 6070 bytes

This solution works if x=0. There is a single trailing newline.

s='s=%r;exec"print%%r;"%%(s%%s)*input()';exec"print%r;"%(s%s)*input()


Try it online

 

Python 2, 60 bytes (invalid)

This assumes that x>=1, but the OP clarified that x can be zero. There is a single trailing newline.

s='s=%r;print(s%%s*input())[:-1]\n';print(s%s*input())[:-1]


Try it online

This assumes that x>=1.

Python 2, 60 bytes

There is a single trailing newline.

s='s=%r;print(s%%s*input())[:-1]\n';print(s%s*input())[:-1]


Try it online

This assumes that x>=1.

Python 2, 70 bytes

This solution works if x=0. There is a single trailing newline.

s='s=%r;exec"print%%r;"%%(s%%s)*input()';exec"print%r;"%(s%s)*input()


Try it online

 

Python 2, 60 bytes (invalid)

This assumes that x>=1, but the OP clarified that x can be zero. There is a single trailing newline.

s='s=%r;print(s%%s*input())[:-1]\n';print(s%s*input())[:-1]


Try it online

2 added 39 characters in body
source | link

Python 2, 60 bytes

There is a single trailing newline.

s='s=%r;print(s%%s*input())[:-1]\n';print(s%s*input())[:-1] 


Try it online

This assumes that x>=1.

Python 2, 60 bytes

s='s=%r;print(s%%s*input())[:-1]\n';print(s%s*input())[:-1]

Try it online

This assumes that x>=1.

Python 2, 60 bytes

There is a single trailing newline.

s='s=%r;print(s%%s*input())[:-1]\n';print(s%s*input())[:-1] 


Try it online

This assumes that x>=1.

1
source | link

Python 2, 60 bytes

s='s=%r;print(s%%s*input())[:-1]\n';print(s%s*input())[:-1]

Try it online

This assumes that x>=1.