#K36152. Counting Passing Students
Counting Passing Students
Counting Passing Students
You are given a list of students and their scores. A student is considered to have passed the exam if their score is at least \( p \) (i.e., \( score \ge p \)). Your task is to count the number of students who have passed.
Input Format: The first line contains two integers \( n \) and \( p \), where \( n \) is the number of students and \( p \) is the passing mark. Each of the following \( n \) lines contains a student's name and an integer score, separated by a space.
Output Format: Print a single integer representing the number of students who passed the exam.
inputFormat
The first line of input contains two integers n and p separated by a space. The next n lines each contain a student's name (a string without spaces) followed by an integer representing the student's score.
outputFormat
Output a single integer indicating the number of students whose score is greater than or equal to p.## sample
3 50
alice 50
bob 60
charlie 70
3