Test Creation
Ralph manages a team if test creators who work on creating N tests for various company's recruitment processes. The team consists of (n1+n2+n3) interns who are categorized into three groups based on thier assigned tasks. The group are as follows:
Each intern in a group works with the same efficiency. The time taken by an intern in Test Research is t days. Test Creation is t+2 days, and Test Final Review is t-2 days to complete their task. The HR team wants to ensure that the interns work efficiently and complete their work within d days.
Your task is to determine and return wether it is possible to complete the work within the assigned time. If it is possible, return "Yes X," where X is the number of days it would take to finish the work, otherwise, return "No Y", where Y is the number of days short.
Note:
Input Specification:
input1: An integer N, representing the total number of tests to be created.
input2: An integer n1, representing the number of interns working on Test Research.
input3: An integer n2, representing the number of interns working on Test Creation.
input4: An integer n3, representing the number of interns working on Test Final Review.
input5: An integer t, representing the Time Taken.
input6: An integer d, representing the number of days given by the HR team.
Output Specification:
Return a string denoting "Yes X," where X is the number of days it would take to finish the work, otherwise "No Y," where Y is the number of days short.
Example 1:
input1: 1
input2: 1
input3: 1
input4: 1
input5: 5
input6: 20
Output: Yes 15
Explanation:
Here, N=1,n1=1,n2=1,n3=1,t=5, and d=20. So, the tasks can be performed in the following manner:
All three activites will be finished in a total of 5+7+3 = 15 days. Hence, Yes 15 is returned as the output.
Example 2:
input1: 5
input2: 3
input3: 3
input4: 9
input5: 6
input6: 30
Output: Yes 26
Explanation:
Here, N=5,n1=3,n2=3,n3=9,t=6, and d=30. So, the tasks can be performed in the following manner:
Since, the total time required to complete the work within the given deadline is 22+4 = 26 days. Hence, Yes 26 is returned as the output.