Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace 01. National Court
- {
- class Program
- {
- static void Main(string[] args)
- {
- int firstEmployyee = int.Parse(Console.ReadLine());
- int secondEmployyee = int.Parse(Console.ReadLine());
- int thirdEmployyee = int.Parse(Console.ReadLine());
- int howManyPeople = int.Parse(Console.ReadLine());
- int sumPerHour = firstEmployyee + secondEmployyee + thirdEmployyee;
- int hours = 0;
- while (true)
- {
- if (howManyPeople <= 0)
- {
- break;
- }
- hours++;
- if (hours % 4 == 0)
- {
- hours++;
- }
- howManyPeople -= sumPerHour;
- }
- Console.WriteLine($"Time needed: {hours}h.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement