• + 3 comments

    *This is my code C# , pass all test case : *

    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    class Solution
    { 
        static void Main(String[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine());
            string[] arr_temp = Console.ReadLine().Split(' ');
            int[] arr = Array.ConvertAll(arr_temp, Int32.Parse);
            int length = n;
            for (int i = 0; i < length / 2; i++)
            {
                int temp = arr[i];
                arr[i] = arr[length - i - 1];
                arr[length - i - 1] = temp;
            }
            for (int j = 0; j < n; j++)
            {
                Console.Write($"{arr[j]} ");
            }
        }
    }