Question: * please do not use AI to generate the answer In Taiwan's receipt lottery, each receipt number consists of 8 digits . For each drawing,
please do not use AI to generate the answer
In Taiwan's receipt lottery, each receipt number consists of digits For each drawing, there is one special prize number and three first prize numbers. The prizes are awarded based on the following rules:
Special Prize: If the digit number matches the special prize number exactly, the prize is NTD
First Prize: If the digit number matches any of the three first prize numbers exactly, the prize is NTD
Second Prize: If the last digits of the number match the last digits of any first prize number, the prize is NTD
Third Prize: If the last digits of the number match the last digits of any first prize number, the prize is NTD
Fourth Prize: If the last digits of the number match the last digits of any first prize number, the prize is NTD
Fifth Prize: If the last digits of the number match the last digits of any first prize number, the prize is NTD
Sixth Prize: If the last digits of the number match the last digits of any first prize number, the prize is NTD
If a receipt qualifies for multiple prizes, only the prize with the highest value is awarded.
Write a program to calculate the total prize money for a list of receipt numbers. The program should validate the receipt numbers and only process those that are valid exactly digit numbersInput Description:
Special Prize and First Prize Numbers:
special
heads
Tickets: A list of receipt numbers the number of tickets is not limited
Output Description:
Return the total prize amount. If any ticket number is invalid not an digit numberthat ticket will not be processed for prize calculation.
Example:
Input:
special
heads
tickets
Output:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
