Afficher la dernière ligne

On vous demande d'afficher la dernière ligne d'un fichier.

L'entrée du programme contient une seule ligne - le nom du fichier.

La sortie du programme doit contenir une seule ligne - la dernière ligne du fichier. Il est garanti que le fichier contient au moins une ligne.

Entrée

input.txt

Sortie

input.txt

hello this is
some file content

some file content

Entrée

single.txt

Sortie

single.txt

this file has only 1 line

this file has only 1 line

Entrée

many.txt

Sortie

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