Guest User

19. Thea The Photographer

a guest
Oct 4th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.95 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 TheaThePhotographer
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double pictureNumb = double.Parse(Console.ReadLine());
  14.             double filterTime = double.Parse(Console.ReadLine());
  15.             double goodPic = double.Parse(Console.ReadLine());
  16.             double uploadTIme = double.Parse(Console.ReadLine());
  17.  
  18.             TimeSpan totalTime = TimeSpan.FromSeconds((Math.Ceiling(pictureNumb * (goodPic / 100)) * uploadTIme) + (pictureNumb * filterTime));
  19.  
  20.             string answer = string.Format("{0}:{1:d2}:{2:d2}:{3:d2}",
  21.                             totalTime.Days,
  22.                             totalTime.Hours,
  23.                             totalTime.Minutes,
  24.                             totalTime.Seconds);
  25.  
  26.             Console.WriteLine(answer);
  27.         }
  28.     }
  29. }
Add Comment
Please, Sign In to add comment