X1258: GreenTicket

You have a green lottery ticket with three integers: a, b, and c. If all of the numbers are different on it, return 0. If two of the numbers are the same, return 10. If all of the numbers are the same, return 20.

Examples:

greenTicket(2,4,6) -> 0
greenTicket(12,14,14) -> 10

Your Answer:

Feedback

Your feedback will appear here when you check your answer.