Guest User

Thea The Photographer

a guest
Oct 4th, 2017
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace TheaThePhotographer
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. long picturesTaken = long.Parse(Console.ReadLine());
  14. long filterTimePerPicture = long.Parse(Console.ReadLine());
  15. long goodPicturesPercentage = long.Parse(Console.ReadLine());
  16. long uploadTimePerPicture = long.Parse(Console.ReadLine());
  17.  
  18.  
  19. double goodPictures = Math.Ceiling((picturesTaken * goodPicturesPercentage) / 100.0);
  20.  
  21. double filterTime = picturesTaken * filterTimePerPicture;
  22.  
  23. double uploadTime = goodPictures * uploadTimePerPicture;
  24.  
  25. long totalTime = (long)(filterTime + uploadTime);
  26.  
  27. TimeSpan timeTaken = TimeSpan.FromSeconds(totalTime);
  28.  
  29. string formattedTime = timeTaken.ToString(@"d\:hh\:mm\:ss");
  30.  
  31. Console.WriteLine(formattedTime);
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment