Imprimir a última linha

Você deve imprimir a última linha do ficheiro.

A entrada do programa contém uma única linha: o nome do ficheiro.

A saída do programa deve conter uma única linha: a última linha do ficheiro. É garantido que o ficheiro contém pelo menos uma linha.

Entrada

input.txt

Saída

input.txt

hello this is
some file content

some file content

Entrada

single.txt

Saída

single.txt

this file has only 1 line

this file has only 1 line

Entrada

many.txt

Saída

many.txt

this file
has

many
many lines

many lines

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue