There is no hard limit on the number of lines or characters.
However:
Write clean, readable code
Avoid unnecessary length or complexity
Stick to solving the problem; over-engineering may hurt your evaluation
The system provides you with sufficient space to complete any task fully.
But bloated or irrelevant code may raise flags during review.