Guest User

Untitled

a guest
Jun 8th, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.80 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _19.Thea_The_Photographer
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             ulong picturesTaken = ulong.Parse(Console.ReadLine());
  10.             ulong timeInSecondsToFilterPicture = ulong.Parse(Console.ReadLine());
  11.             ulong percentageOfGoodPictures = ulong.Parse(Console.ReadLine());
  12.             ulong timeToUploadPicture = ulong.Parse(Console.ReadLine());
  13.  
  14.             ulong goodPictures = (ulong)Math.Ceiling(picturesTaken / 100d * percentageOfGoodPictures);
  15.  
  16.             ulong timeInSeconds = (goodPictures * timeToUploadPicture) + (timeInSecondsToFilterPicture * picturesTaken);
  17.  
  18.             TimeSpan time = TimeSpan.FromSeconds(timeInSeconds);
  19.  
  20.             Console.WriteLine(time.ToString(@"d\:hh\:mm\:ss"));
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment