Skip to content

Commit 01bcff5

Browse files
committed
Added different solution.
1 parent b8f3e79 commit 01bcff5

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed
Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,37 @@
11
first_employee = int(input())
22
second_employee = int(input())
33
third_employee = int(input())
4-
students = int(input())
4+
students_questions = int(input())
55

66
total_employees = first_employee + second_employee + third_employee
77
hour_counter = 0
88

9-
while students > 0:
9+
while students_questions > 0:
1010
if hour_counter % 4 == 0:
1111
hour_counter += 1
1212

13-
students -= total_employees
13+
students_questions -= total_employees
1414

15-
if students <= 0:
15+
if students_questions <= 0:
1616
break
1717

1818
hour_counter += 1
1919

2020
print(f"Time needed: {hour_counter}h.")
21+
22+
23+
# Different Solution:
24+
25+
# employee_info = [int(input()) for num in range(4)]
26+
#
27+
# answers_per_hr = sum(employee_info[:-1])
28+
# students_questions = employee_info[-1]
29+
# time_needed = 0
30+
#
31+
# while students_questions > 0:
32+
# time_needed += 1
33+
#
34+
# if time_needed % 4 != 0:
35+
# students_questions -= answers_per_hr
36+
#
37+
# print(f"Time needed: {time_needed}h.")

0 commit comments

Comments
 (0)