Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace National_Court
- {
- class Program
- {
- static void Main(string[] args)
- {
- int firstEmployee = int.Parse(Console.ReadLine());
- int secondEmployee = int.Parse(Console.ReadLine());
- int thirdEmployee = int.Parse(Console.ReadLine());
- int peopleCount = int.Parse(Console.ReadLine());
- double hours = Math.Ceiling((double)peopleCount / (firstEmployee + secondEmployee + thirdEmployee));
- if (hours > 3)
- {
- hours += Math.Floor(hours / 3.0);
- }
- Console.WriteLine($"Time needed: {hours}h.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement