Advertisement
Pietras286

ROL

Dec 13th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1. namespace Problem18
  2. {
  3.     class Program
  4.     {
  5.         static void Main(string[] args)
  6.         {
  7.             int t = int.Parse(Console.ReadLine());
  8.             for (int i = 0; i < t; i++)
  9.             {
  10.                 Queue<string> kolejka = new Queue<string>(Console.ReadLine().Split(' '));
  11.                 kolejka.Dequeue();
  12.                 var item = kolejka.Dequeue();
  13.                 kolejka.Enqueue(item);
  14.                 foreach (var x in kolejka)
  15.                 {
  16.                     Console.Write(x + " ");
  17.                 }
  18.                 Console.WriteLine();
  19.             }
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement