Advertisement
Guest User

Untitled

a guest
Oct 25th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.00 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Globalization;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace p_02
  9. {
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             ulong totalPic = ulong.Parse(Console.ReadLine());
  15.             ulong filterTime = ulong.Parse(Console.ReadLine());
  16.             ulong filterFactorInPercent = ulong.Parse(Console.ReadLine());
  17.             ulong uploadTime = ulong.Parse(Console.ReadLine());
  18.  
  19.             ulong usefulPic = (ulong)Math.Ceiling((filterFactorInPercent / 100.0) * totalPic);
  20.             ulong secondsTotalPic = totalPic * filterTime;
  21.             ulong secondsFilterPic = usefulPic * uploadTime;
  22.             ulong totalSec = secondsFilterPic + secondsTotalPic;
  23.  
  24.             DateTime time = new DateTime();
  25.             time = time.AddSeconds(totalSec);
  26.             Console.WriteLine($"{time.Day - 1:D1}:{time.Hour:D2}:{time.Minute:D2}:{time.Second:D2}");
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement