Print the last line

You are asked to print the last line of the file.
The input of the program contains a single line - the name of the file.
The output of the program should contain a single line - the last line of the file. It’s guaranteed that the file contains at least a single line.
Input
input.txt
Output
input.txt
hello this is some file content
some file content
 

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