Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main()
- {
- var nPictures = int.Parse(Console.ReadLine());
- var filterSeconds = int.Parse(Console.ReadLine());
- var PercentUseful = int.Parse(Console.ReadLine());
- long secondsUpload = int.Parse(Console.ReadLine());
- var TimeFiltering = nPictures * filterSeconds;
- var nUseful =(int)Math.Ceiling((nPictures * PercentUseful) / 100.0);
- long totalUpload = secondsUpload * nUseful;
- long totalSec = TimeFiltering + totalUpload;
- long days = totalSec / 86400;
- long daysLeft = totalSec % 86400;
- long hours = daysLeft / 3600;
- long hoursLeft = daysLeft % 3600;
- long min = hoursLeft / 60;
- long sec = hoursLeft % 60;
- Console.WriteLine("{0}:{1:D2}:{2:D2}:{3:D2}", days, hours, min, sec);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement