Scroll Display
Statement
Goal
There's this cool display I have which displays................
When it's trying to display a certain string, it justifies the letters to the right:
Hello World
When the string is longer than the screen can display, it scrolls:
This sentence is
his sentence is
is sentence is l
s sentence is lo
sentence is lon
sentence is long
Can you emulate my screen?
Input
A single line containing S, the string to display. This string can contain any ASCII characters.
Output
One or more lines displaying S, with multiple lines indicating scrolling if necessary.
Constraints
1 ≤ Length of S ≤ 72
Example
Input
This sentence is long
Output
This sentence is his sentence is is sentence is l s sentence is lo sentence is lon sentence is long
Game modes
Fastest, Reverse
Test cases
Simple scroll Test
Input
This sentence is long
Output
This sentence is
his sentence is
is sentence is l
s sentence is lo
sentence is lon
sentence is long
Simple scroll validator Validator
Input
That sentence is short
Output
That sentence is
hat sentence is
at sentence is s
t sentence is sh
sentence is sho
sentence is shor
entence is short
No scroll Test
Input
Hello world
Output
Hello world
No scroll validator Validator
Input
Hi says world
Output
Hi says world
Extra short Test
Input
a
Output
a
Extra short validator Validator
Input
y
Output
y
Hyper scroll Test
Input
DAY NINE! GIVE IT UP FOR DAY NINE! DAY FIFTEEN! GIVE IT FOR DAY FIFTEEN!
Output
DAY NINE! GIVE I
AY NINE! GIVE IT
Y NINE! GIVE IT
NINE! GIVE IT U
NINE! GIVE IT UP
INE! GIVE IT UP
NE! GIVE IT UP F
E! GIVE IT UP FO
! GIVE IT UP FOR
GIVE IT UP FOR
GIVE IT UP FOR D
IVE IT UP FOR DA
VE IT UP FOR DAY
E IT UP FOR DAY
IT UP FOR DAY N
IT UP FOR DAY NI
T UP FOR DAY NIN
UP FOR DAY NINE
UP FOR DAY NINE!
P FOR DAY NINE!
FOR DAY NINE! D
FOR DAY NINE! DA
OR DAY NINE! DAY
R DAY NINE! DAY
DAY NINE! DAY F
DAY NINE! DAY FI
AY NINE! DAY FIF
Y NINE! DAY FIFT
NINE! DAY FIFTE
NINE! DAY FIFTEE
INE! DAY FIFTEEN
NE! DAY FIFTEEN!
E! DAY FIFTEEN!
! DAY FIFTEEN! G
DAY FIFTEEN! GI
DAY FIFTEEN! GIV
AY FIFTEEN! GIVE
Y FIFTEEN! GIVE
FIFTEEN! GIVE I
FIFTEEN! GIVE IT
IFTEEN! GIVE IT
FTEEN! GIVE IT F
TEEN! GIVE IT FO
EEN! GIVE IT FOR
EN! GIVE IT FOR
N! GIVE IT FOR D
! GIVE IT FOR DA
GIVE IT FOR DAY
GIVE IT FOR DAY
IVE IT FOR DAY F
VE IT FOR DAY FI
E IT FOR DAY FIF
IT FOR DAY FIFT
IT FOR DAY FIFTE
T FOR DAY FIFTEE
FOR DAY FIFTEEN
FOR DAY FIFTEEN!
Hyper scroll validator Validator
Input
WAIT, DOES SPONGEBOB HAVE COPYRIGHT FOR THAT LINE? LIKE COULD I GET SUED
Output
WAIT, DOES SPONG
AIT, DOES SPONGE
IT, DOES SPONGEB
T, DOES SPONGEBO
, DOES SPONGEBOB
DOES SPONGEBOB
DOES SPONGEBOB H
OES SPONGEBOB HA
ES SPONGEBOB HAV
S SPONGEBOB HAVE
SPONGEBOB HAVE
SPONGEBOB HAVE C
PONGEBOB HAVE CO
ONGEBOB HAVE COP
NGEBOB HAVE COPY
GEBOB HAVE COPYR
EBOB HAVE COPYRI
BOB HAVE COPYRIG
OB HAVE COPYRIGH
B HAVE COPYRIGHT
HAVE COPYRIGHT
HAVE COPYRIGHT F
AVE COPYRIGHT FO
VE COPYRIGHT FOR
E COPYRIGHT FOR
COPYRIGHT FOR T
COPYRIGHT FOR TH
OPYRIGHT FOR THA
PYRIGHT FOR THAT
YRIGHT FOR THAT
RIGHT FOR THAT L
IGHT FOR THAT LI
GHT FOR THAT LIN
HT FOR THAT LINE
T FOR THAT LINE?
FOR THAT LINE?
FOR THAT LINE? L
OR THAT LINE? LI
R THAT LINE? LIK
THAT LINE? LIKE
THAT LINE? LIKE
HAT LINE? LIKE C
AT LINE? LIKE CO
T LINE? LIKE COU
LINE? LIKE COUL
LINE? LIKE COULD
INE? LIKE COULD
NE? LIKE COULD I
E? LIKE COULD I
? LIKE COULD I G
LIKE COULD I GE
LIKE COULD I GET
IKE COULD I GET
KE COULD I GET S
E COULD I GET SU
COULD I GET SUE
COULD I GET SUED
Full display Test
Input
Sixteen is magic
Output
Sixteen is magic
Full display validator Validator
Input
Exactly sixteen!
Output
Exactly sixteen!
Solution language
Solution
Stub generator input