YankoGrancharov

photografer

Oct 8th, 2017
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.99 KB | None | 0 0
  1. using System;
  2. namespace problem19TheaThePhotographer
  3. {
  4.     class Problem19TheaThePhotographer
  5.     {
  6.         static void Main()
  7.         {
  8.             long pictures = long.Parse(Console.ReadLine());
  9.             long timeForFilter = long.Parse(Console.ReadLine());
  10.             long percentGodPictures = long.Parse(Console.ReadLine());
  11.             long timeForUpload = long.Parse(Console.ReadLine());
  12.  
  13.             long filterTime = pictures * timeForFilter;
  14.             long godPictures = (long)Math.Ceiling(pictures * percentGodPictures / 100);
  15.             long timeUplouding = godPictures* timeForUpload;
  16.             long totaltime = filterTime + timeUplouding;
  17.  
  18.             long day = totaltime / 86400;
  19.             long cas = totaltime % 86400;
  20.             long hours = cas / 3600;
  21.             long min = cas % 3600;
  22.             long minutes = min / 60;
  23.             long sec = min % 60;
  24.             Console.WriteLine($"{day}:{hours:D2}:{minutes:D2}:{sec:D2}");
  25.          
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment