Advertisement
SimeonSheytanov

Thea the Photographer

Sep 13th, 2016
889
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.87 KB | None | 0 0
  1. namespace TheaThePhotographer
  2. {
  3.     using System;
  4.     public class TheaThePhotographer
  5.     {
  6.         public static void Main(string[] args)
  7.         {
  8.             int picturesCount = int.Parse(Console.ReadLine());
  9.             int filterTime = int.Parse(Console.ReadLine());
  10.             int filterFactor = int.Parse(Console.ReadLine());
  11.             int uploadTime = int.Parse(Console.ReadLine());
  12.  
  13.             double percentage = filterFactor / 100.0;
  14.             int usefulPictures = (int)Math.Ceiling(picturesCount * percentage);
  15.  
  16.             long totalPictures = picturesCount * (long)filterTime;
  17.             long uploadedPictures = usefulPictures * (long)uploadTime;
  18.            
  19.             Console.WriteLine(
  20.                 TimeSpan.FromSeconds(totalPictures + uploadedPictures)
  21.                     .ToString(new string('d', 1) + @"\:hh\:mm\:ss"));
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement