Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace Append_Arrays
- {
- class Program
- {
- static void Main(string[] args)
- {
- List<string> whole = Console.ReadLine()
- .Split("|")
- .Reverse()
- .ToList();
- List<int> resultList = new List<int>();
- for (int i = 0; i < whole.Count; i++)
- {
- List<int> currentResult = new List<int>(whole[i]
- .Split(" ", StringSplitOptions.RemoveEmptyEntries).Select(int.Parse)
- .ToList());
- resultList.AddRange(currentResult);
- }
- Console.WriteLine(string.Join(" ", resultList));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement