TonyTroev

Thea The Photographer

Feb 1st, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.78 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _19_TheaThePhotographer
  8. {
  9.     class TheaThePhotographer
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             ulong pictures = ulong.Parse(Console.ReadLine());
  14.             ulong filterTime = ulong.Parse(Console.ReadLine());
  15.             ulong filteredPercentage = ulong.Parse(Console.ReadLine());
  16.             ulong uploadTime = ulong.Parse(Console.ReadLine());
  17.             ulong totalTime = pictures * filterTime + (ulong)Math.Ceiling(filteredPercentage * pictures / 100.0) * uploadTime;
  18.  
  19.             TimeSpan time = TimeSpan.FromSeconds(totalTime);
  20.             Console.WriteLine(time.ToString(@"d\:hh\:mm\:ss"));
  21.         }
  22.     }
  23. }
Add Comment
Please, Sign In to add comment