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;
- using System.Text;
- using System.Threading.Tasks;
- namespace TaskC
- {
- class Program
- {
- static void Main(string[] args)
- {
- int year, month, day, period, count = 0;
- string[] date = Console.ReadLine().Split(' ');
- year = int.Parse(date[0]);
- month = int.Parse(date[1]);
- day = int.Parse(date[2]);
- period = int.Parse(Console.ReadLine());
- string[] concentration = Console.ReadLine().Split(' ');
- double current = double.Parse(concentration[0], CultureInfo.InvariantCulture);
- double old = double.Parse(concentration[1], CultureInfo.InvariantCulture);
- while (current > old)
- {
- current /= 2;
- count += period;
- }
- DateTime start = new DateTime(year, month, day);
- DateTime end = start.AddDays(count);
- Console.WriteLine(end.Year + " " + end.Month + " " + end.Day);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment