#C11851. Total Coins on Even Minutes
Total Coins on Even Minutes
Total Coins on Even Minutes
Given a series of coin toss events, each described by the number of coins thrown (C) and the minute (T) at which the toss occurred, your task is to compute the total number of coins thrown at even-numbered minutes. Only events where the minute T is even (i.e., \(T \mod 2 = 0\)) contribute to the total.
For example, an event (30, 2) contributes 30 to the sum because 2 is even, while an event (50, 1) does not contribute because 1 is odd. Ensure your solution reads input from standard input (stdin) and writes output to standard output (stdout).
inputFormat
The first line contains an integer \(N\) which represents the number of coin toss events. Each of the following \(N\) lines contains two space-separated integers \(C\) and \(T\) where \(C\) is the number of coins thrown and \(T\) is the minute at which the event occurred.
outputFormat
Print a single integer representing the total number of coins thrown at even-numbered minutes.
## sample5
50 1
30 2
20 4
10 7
60 6
110
</p>