Advertisement
Guest User

Untitled

a guest
Oct 8th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.85 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.0));
  15.             long timeUplouding = godPictures * timeForUpload;
  16.             long totaltime = filterTime + timeUplouding;
  17.  
  18.             TimeSpan time = TimeSpan.FromSeconds(totaltime);
  19.             string result = time.ToString(@"d\:hh\:mm\:ss");
  20.             Console.WriteLine(result);
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement