using System;
using System.Collections.Generic;
namespace ProgramConsole
{
class Program
{
static void Main(string[] args)
{
List<int> list = new List<int>(){1, 2, 3, 4, 5};
if(!list.Contains(6))
list.Add(6);
foreach (var i in list)
{
Console.WriteLine(i);
}
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYzsKCm5hbWVzcGFjZSBQcm9ncmFtQ29uc29sZQp7CiAgICBjbGFzcyBQcm9ncmFtCiAgICB7CiAgICAgICAgc3RhdGljIHZvaWQgTWFpbihzdHJpbmdbXSBhcmdzKQogICAgICAgIHsKICAgICAgICAgICAgTGlzdDxpbnQ+IGxpc3QgPSBuZXcgTGlzdDxpbnQ+KCl7MSwgMiwgMywgNCwgNX07CiAgICAgICAgICAgIGlmKCFsaXN0LkNvbnRhaW5zKDYpKQogICAgICAgICAgICAgICAgbGlzdC5BZGQoNik7CiAgICAgICAgICAgIGZvcmVhY2ggKHZhciBpIGluIGxpc3QpCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIENvbnNvbGUuV3JpdGVMaW5lKGkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9