Advertisement
TeMePyT

Untitled

May 28th, 2018
143
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.  
  3. namespace P05_Special_Numbers
  4. {
  5. class Program
  6. {
  7.  
  8. static void Main(string[] args)
  9. {
  10. //ulong n = ulong.Parse(Console.ReadLine());
  11.  
  12.  
  13. ulong Pictures = ulong.Parse(Console.ReadLine());
  14. ulong AmountOfTime = ulong.Parse(Console.ReadLine());
  15. ulong percentage = ulong.Parse(Console.ReadLine());
  16. ulong NeededTime = ulong.Parse(Console.ReadLine());
  17. decimal UsefulPicrure = Math.Ceiling(Pictures * (decimal)percentage / 100);
  18.  
  19. //200 х 8 % / 100 =
  20.  
  21. ulong totalTime = Pictures * (ulong)AmountOfTime + (ulong)UsefulPicrure * (ulong)NeededTime;
  22. string final = Convert.ToString(totalTime);
  23.  
  24. TimeSpan t = TimeSpan.FromSeconds(Convert.ToDouble(final));
  25.  
  26. Console.WriteLine(t.ToString(@"d\:hh\:mm\:ss"));
  27.  
  28.  
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement