SAC '22 Code Challenge 5 Junior P2 - Badminton Scoring
View as PDFAfter winning his Fortnite game, Mr. DeMello decided to play  badminton games.
Each of these games has a score for Mr. DeMello, , and a score for his opponent, 
.
Mr. DeMello wins a game if he has strictly more points than his opponent.
Can you tell DeMello how many of the  games he won?
Constraints
Input Specification
The first line will contain an integer, , the number of games.
The next  lines will contain two integers, 
 and 
, the scores for the 
 game.
Output Specification
Output the number of games Mr. DeMello won.
Sample Input
6
0 0
1 0
21 21
20 21
5 3
16 3
Sample Output
3
Explanation for Sample Output
Mr. DeMello only wins  games: the second one (
 to 
), the fifth one (
 to 
), and the sixth one (
 to 
).
Comments