最後の行を出力する
ファイルの最後の行を出力するように求められています。
プログラムの入力は、1行のみで、ファイルの名前が含まれています。
プログラムの出力は、1行のみで、そのファイルの最後の行である必要があります。ファイルには少なくとも1行が含まれていることが保証されています。
入力 | input.txt | 出力 |
---|---|---|
input.txt | hello this is | some file content |
入力 | single.txt | 出力 |
---|---|---|
single.txt | this file has only 1 line | this file has only 1 line |
入力 | many.txt | 出力 |
---|---|---|
many.txt | this file | many lines |
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB