#150. 三数求和(去重)

    ID: 150 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatLogic-2gesp1条件结构

三数求和(去重)

Sum with Duplicates

Background

Dawei is teaching Congcong programming. Today they encountered an interesting sum problem.

Problem Description

Given three integer values, a,b,ca, b, c, 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: 1,2,31, 2, 3 are all distinct, so the sum is 1+2+3=61+2+3=6. Sample 2: In 3,2,33, 2, 3, 33 appears twice. Only 22 is unique, so the sum is 22. Sample 3: In 3,3,33, 3, 3, all numbers are the same, there are no unique values, so the sum is 00.

Constraints

1s, 1024KiB for each test case.