Problem Statement: Particulate matters are the biggest contributors to New-Delhi pollution. The main reason behind the increase in the concentration of Particulate matters include vehicle emission by applying Odd Even Number concept for all types of vehicles. The vehicles with the odd number last digit in the registration number will be allowed on roads on odd dates and those with even number last digit will on even dates.
Given an integer array A[], contains the last digit of the registration number of n vehicles traveling on date d(a positive integer). The task is to calculate the total fine collected by the traffic police department from the vehicles violating the rules.
Note: For violating the rule, vehicles would be fined as x Rs.