Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Globalization;
- using System.Linq;
- namespace P05._Book_Library
- {
- class Program
- {
- static void Main(string[] args)
- {
- int counter = int.Parse(Console.ReadLine());
- List<string> line = new List<string>();
- var dict = new Dictionary<string, DateTime>();
- for (int i = 0; i < counter; i++)
- {
- line = Console.ReadLine().Split().ToList();
- dict.Add(line[0], DateTime.Parse(line[3]));
- }
- DateTime fromDate = DateTime.ParseExact(Console.ReadLine(), "dd.MM.yyyy", CultureInfo.InvariantCulture);
- foreach (var item in dict.Where(x=>x.Value>fromDate))
- {
- Console.WriteLine($"{item.Key} -> {item.Value.ToString("dd.MM.yyyy")}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement