Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Globalization;
- class Program
- {
- public static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- DateTime firstDate = DateTime
- .ParseExact(Console.ReadLine(), "dd-MM-yyyy", CultureInfo.InvariantCulture)
- .AddDays(n / 2 + n % 2);
- DateTime secondDate = DateTime
- .ParseExact(Console.ReadLine(), "dd-MM-yyyy", CultureInfo.InvariantCulture)
- .AddDays(n / 2);
- Console.WriteLine(firstDate.Day + secondDate.Day);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement