Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace ConsoleApp1
- {
- using System;
- public class Program
- {
- public static void Main()
- {
- long picturesTaken = long.Parse(Console.ReadLine());
- long filteringTime = long.Parse(Console.ReadLine());
- long percentage = long.Parse(Console.ReadLine());
- long uploadTime = long.Parse(Console.ReadLine());
- long filteredAmount = (long)Math.Ceiling(picturesTaken * percentage / 100d);
- long filterAllPictures = picturesTaken * filteringTime;
- long uploadAllPictures = filteredAmount * uploadTime;
- long totalTime = filterAllPictures + uploadAllPictures;
- TimeSpan projectTime = TimeSpan.FromSeconds(totalTime);
- Console.WriteLine("{0:D1}:{1:D2}:{2:D2}:{3:D2}",
- projectTime.Days,
- projectTime.Hours,
- projectTime.Minutes,
- projectTime.Seconds);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement