Advertisement
_CodeBehind

19. Thea The Photographer

Jan 19th, 2017
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 KB | None | 0 0
  1. using System;
  2. using System.Numerics;
  3.  
  4. namespace _17.DifferentIntegersSize
  5. {
  6.     class DifferentIntegersSize
  7.     {
  8.         static void Main()
  9.         {
  10.             int totalPic = int.Parse(Console.ReadLine());
  11.             int filterTime = int.Parse(Console.ReadLine());
  12.             double precent = double.Parse(Console.ReadLine());
  13.             int uploadTime = int.Parse(Console.ReadLine());
  14.  
  15.             double makepercent = precent / 100.0;
  16.             int GoodPictures = (int)Math.Ceiling(totalPic * makepercent);
  17.             long goodPictureUpload = GoodPictures * (long)uploadTime;
  18.             long allPictureFilter = totalPic * (long)filterTime;
  19.             long TotalTimeToComplete = goodPictureUpload + allPictureFilter;
  20.  
  21.             TimeSpan result = TimeSpan.FromSeconds(TotalTimeToComplete);
  22.             string fromTimeString = result.ToString(@"d\:hh\:mm\:ss");
  23.             Console.WriteLine(fromTimeString);
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement