Guest User

Untitled

a guest
Feb 4th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 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 _19_Thea_the_Photographer
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. ulong numberOfPictures = ulong.Parse(Console.ReadLine());
  14. ulong secondsForEveryPicture = ulong.Parse(Console.ReadLine());
  15. ulong pictureFaktor = ulong.Parse(Console.ReadLine());
  16. ulong secondsForFilterPicture = ulong.Parse(Console.ReadLine());
  17.  
  18. ulong firstOperationTime = numberOfPictures * secondsForEveryPicture;
  19. ulong timeForFilter = (ulong)Math.Ceiling((pictureFaktor * 0.01) * numberOfPictures);
  20. ulong secondOperationTime = timeForFilter * secondsForFilterPicture;
  21. ulong timeAllInSeconds = firstOperationTime + secondOperationTime;
  22.  
  23.  
  24.  
  25. TimeSpan time = TimeSpan.FromSeconds(timeAllInSeconds);
  26. string totalTime = time.ToString(@"d\:hh\:mm\:ss");
  27. Console.WriteLine(totalTime);
  28.  
  29. }
  30. }
  31. }
Add Comment
Please, Sign In to add comment