Social distancing

During the pandemic people needed to keep their distance from each other in order not to spread the virus.
A grocery store was trying to design its queueing system so that at least 5 people could stay in the line by keeping a distance of d meters from each other. They ask you to visualize that queue for 5 people by providing a number d as an input. Please print the resulting queue for 5 people by indicating the distance from the cashier to the customer and put the <--> symbol in between them to represent the d distance between them.
Input
Output
4
0<-->4<-->8<-->12<-->16
2
0<-->2<-->4<-->6<-->8
 
To check your solution you need to sign in
Sign in to continue