#150. 三数求和(去重)
三数求和(去重)
Sum with Duplicates
Background
Dawei is teaching Congcong programming. Today they encountered an interesting sum problem.
Problem Description
Given three integer values, , return their sum. However, if one of the values is the same as another of the values, it does not count towards the sum. In other words, only values that are unique among the three numbers will be counted towards the sum.
Input Format
Input is given from Standard Input in the following format.
a b c
Output Format
Output to Standard Output in the following format.
sum
Sample
1 2 3
6
3 2 3
2
3 3 3
0
Sample Explanation
Sample 1: are all distinct, so the sum is . Sample 2: In , appears twice. Only is unique, so the sum is . Sample 3: In , all numbers are the same, there are no unique values, so the sum is .
Constraints
1s, 1024KiB for each test case.