Advertisement
Guest User

afvb

a guest
Jun 3rd, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.16 KB | None | 0 0
  1. namespace _19.Thea_The_Photographer
  2. {
  3.     using System;
  4.    
  5.     public class TheaThePhotographer
  6.     {
  7.         public static void Main()
  8.         {
  9.             int amountOfThePictures = int.Parse(Console.ReadLine());
  10.  
  11.             int timeToFilterPerPicture = int.Parse(Console.ReadLine());
  12.  
  13.             double filterFactorInPersent = int.Parse(Console.ReadLine()) / 100;
  14.  
  15.             int uploadTimePerPicture = int.Parse(Console.ReadLine());
  16.  
  17.             long totalUsefullPictures = (long)Math.Ceiling(amountOfThePictures * percent);
  18.  
  19.             long totalFilteringTime = amountOfThePictures * timeToFilterPerPicture;
  20.  
  21.             long totalUploadTime = totalUsefullPictures * uploadTimePerPicture;
  22.  
  23.             long totalReadyTime = totalUploadTime + totalFilteringTime;
  24.  
  25.             long days = totalReadyTime / (24 * 60 * 60);
  26.  
  27.             long rest = totalReadyTime % (24 * 60 * 60);
  28.  
  29.             long hours = rest / (60 * 60);
  30.  
  31.             rest = rest % (60 * 60);
  32.  
  33.             long minutes = rest / 60;
  34.  
  35.             long seconds = rest % 60;
  36.  
  37.             Console.WriteLine($"{days}:{hours:00}:{minutes:00}:{seconds:00}");
  38.         }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement