#C155. Employee Assessment Filter
Employee Assessment Filter
Employee Assessment Filter
You are given a minimum passing score T and a list of employee records. Each record has a name and three skill scores: Python, Java, and SQL. Each score is either an integer or the string N/A
.
An employee is considered to have passed if, for every skill for which the score is an integer, the score satisfies the inequality \(score \ge T\). Scores that are non‐numeric (such as N/A
) are ignored during the evaluation.
Your task is to filter out the employees who do not pass all the assessments.
inputFormat
The input is read from stdin and has the following format:
T N Name1 Python_score Java_score SQL_score Name2 Python_score Java_score SQL_score ... (N lines in total)
Where:
T
is an integer representing the minimum passing score.N
is an integer representing the number of employees.- Each employee record consists of a name (a string without spaces) followed by three tokens representing the skill scores for Python, Java, and SQL respectively. Each score is either an integer or the string
N/A
.
An integer score s satisfies the pass condition if \(s \ge T\).
outputFormat
The output should be written to stdout in the following format:
M Employee_record_1 Employee_record_2 ... (M lines in total)
Where:
M
is the number of employees who passed all assessments.- Each subsequent line contains the employee record in the same format as the input.
65
3
Alice 85 78 90
Bob 70 95 85
Charlie 90 82 88
3
Alice 85 78 90
Bob 70 95 85
Charlie 90 82 88
</p>