using System;
using System.Linq;
using System.Collections.Generic;
public class Test
{
public static void Main()
{
var list = new List<int>() { 1, 2, 3, 4 };
if (list.Count > 1)
list.RemoveRange(1, list.Count - 1);
Console.Write(string.Join(",", list.Select(i => i.ToString()).ToArray()));
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uTGlucTsKdXNpbmcgU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWM7CgpwdWJsaWMgY2xhc3MgVGVzdAp7CiAgIAoKCXB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKCXsKCSAgICAgICAgdmFyIGxpc3QgPSBuZXcgTGlzdDxpbnQ+KCkgeyAxLCAyLCAzLCA0IH07CgogICAgICAgICAgICBpZiAobGlzdC5Db3VudCA+IDEpCiAgICAgICAgICAgICAgICBsaXN0LlJlbW92ZVJhbmdlKDEsIGxpc3QuQ291bnQgLSAxKTsKCiAgICAgICAgICAgIENvbnNvbGUuV3JpdGUoc3RyaW5nLkpvaW4oIiwiLCBsaXN0LlNlbGVjdChpID0+IGkuVG9TdHJpbmcoKSkuVG9BcnJheSgpKSk7Cgl9Cn0=