VelizarAvramov

19. Thea The Photographer

Nov 15th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 KB | None | 0 0
  1. using System;
  2. using System.Numerics;
  3.  
  4. namespace Demo
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             long picturesTaken = long.Parse(Console.ReadLine());
  11.             long filterTimeSecs = long.Parse(Console.ReadLine());
  12.             long filterFactor = long.Parse(Console.ReadLine());
  13.             long uploatedTime = long.Parse(Console.ReadLine());
  14.  
  15.             long totalFilterTime = filterTimeSecs * picturesTaken;
  16.             long goodPic = (long)(Math.Ceiling(picturesTaken * filterFactor / 100d));
  17.             long totalUploadTime = goodPic * uploatedTime;
  18.             long totalTime = totalFilterTime + totalUploadTime;
  19.  
  20.             TimeSpan projectTime = TimeSpan.FromSeconds(totalTime);
  21.  
  22.             Console.WriteLine($"{projectTime.Days:d1}:{projectTime.Hours:d2}:{projectTime.Minutes:d2}:{projectTime.Seconds:d2}");
  23.  
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment