Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace mid_exam
- {
- class Program
- {
- static void Main(string[] args)
- {
- int reception1 = int.Parse(Console.ReadLine());
- int reception2 = int.Parse(Console.ReadLine());
- int reception3 = int.Parse(Console.ReadLine());
- int peopleCount = int.Parse(Console.ReadLine());
- int countHour = 0;
- while (peopleCount > 0)
- {
- int peoplePerHour = reception1 + reception2 + reception3;
- peopleCount -= peoplePerHour;
- countHour++;
- if (countHour % 4 == 0)
- {
- countHour++;
- }
- }
- Console.WriteLine($"Time needed: {countHour}h.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement