Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace MAR02
- {
- class Program
- {
- static void Main(string[] args)
- {
- var inputStrings = new SortedSet<string>();
- for(string inputString; !string.IsNullOrWhiteSpace(inputString = Console.ReadLine());)
- {
- inputStrings.Add(inputString);
- }
- Console.WriteLine(inputStrings.Count);
- foreach (var item in inputStrings.Select((elem, index) => new { index, elem}))
- {
- Console.WriteLine($"{item.index+1}. {item.elem}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement