Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 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 Thea_The_Photographer
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var picturesCount = int.Parse(Console.ReadLine());
  14. var filterTime = int.Parse(Console.ReadLine());
  15. var filterPercentage = int.Parse(Console.ReadLine());
  16. var upoadTime = int.Parse(Console.ReadLine());
  17.  
  18. var totalFilterTime = picturesCount * filterTime;
  19.  
  20. var goodPictures = (int)(Math.Ceiling(picturesCount * ((double)filterPercentage / 100)));
  21.  
  22. var uploadSeconds = goodPictures * upoadTime;
  23.  
  24. var totalSeconds = totalFilterTime + uploadSeconds;
  25.  
  26. var totalTime = new TimeSpan(0, 0, totalSeconds);
  27.  
  28. Console.WriteLine(totalTime.ToString(@"d\:hh\:mm\:ss"));
  29.  
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement