Advertisement
Guest User

National Court

a guest
Jun 6th, 2020
442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. using System;
  2.  
  3. namespace National_Court
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int firstEmployee = int.Parse(Console.ReadLine());
  10. int secondEmployee = int.Parse(Console.ReadLine());
  11. int thirdEmployee = int.Parse(Console.ReadLine());
  12. int peopleCount = int.Parse(Console.ReadLine());
  13.  
  14. double hours = Math.Ceiling((double)peopleCount / (firstEmployee + secondEmployee + thirdEmployee));
  15.  
  16. if (hours > 3)
  17. {
  18. hours += Math.Floor(hours / 3.0);
  19. }
  20. Console.WriteLine($"Time needed: {hours}h.");
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement