using System.Collections.Generic;
public static void Main()
string[] strArray = new string[]
"7", "7", "7", "7", "7", "7", "7", "7", "7", "7",
List<string> output = new List<string>();
string prev = strArray[0];
for (int i = 1; i <= strArray.Length; i++)
if (i == strArray.Length || prev != strArray[i])
Console.WriteLine("% {0} {1}", counter, prev);
for (int n = 0; n < counter; n++)
Console.Write(prev + " ");
if (i != strArray.Length) {