Company: Autodesk_30sep
Difficulty: medium
Dice Rolling Competition Score Problem Description You've entered a dice-rolling contest that involves throwing three standard 6-sided dice, whose outcomes are the integers a , b , and c . Points are awarded according to these rules: If every die shows the same number ( a = b = c ), you get 1000 * a points. If exactly two dice match, you get 500 * x points (where x is the value shared by the matching pair). If all three dice differ, you get 100 * min(a, b, c) points. Given a , b , and c , compute and return the total number of points earned. You need to implement the following function: int solution(int a, int b, int c) Examples Example 1: Input: a = 3, b = 3, c = 3 Output: 3000 Explanation: All three dice show the same number ( a = b = c = 3 ), so the score works out to 1000 * 3 = 3000 . Example 2: Input: a = 3, b = 6, c = 3 Output: 1500 Explanation: Exactly two of the dice match ( a = c = 3 ), so the score works out to 500 * 3 = 1500 . Example 3: Input: a = 3, b = 2, c = 5 Output: 20