Read N integers into a list, then print the first and last elements on separate lines.
Input:
- First line: N (number of elements)
- Second line: N space-separated integers
Output:
- First line: first element
- Second line: last element
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
List indexing
Read N integers into a list, then print the first and last elements on separate lines.
Input:
Output: