Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Text.RegularExpressions;
- namespace Extended
- {
- class Program
- {
- static void Main(string[] args)
- {
- List<string> list = Console.ReadLine().Split(' ').ToList();
- List<string> bottom = new List<string>();
- List<string> up = new List<string>();
- List<string> res = new List<string>();
- int len = list.Count;
- for (int i = 0; i < len / 2; i++)
- {
- bottom.Add(list[i]);
- }
- for (int i = len / 2; i < len; i++)
- {
- up.Add(list[i]);
- }
- string re = string.Join("", up);
- for (int i = 0; i < bottom.Count; i++)
- {
- res.Add(re[i * 2].ToString());
- res.Add(bottom[i]);
- res.Add(re[i * 2 + 1].ToString());
- }
- Console.WriteLine(string.Join(" ", res));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement