A - One out of Three Editorial /

Time Limit: 2 sec / Memory Limit: 256 MB

配点 : 100100

問題文

33 つの整数 A,B,CA,B,C が与えられます。
A,B,CA,B,C のうち 22 つは 同じ整数であり、残りの 11 つだけ異なる整数です。
例えば、A=5,B=7,C=5A=5,B=7,C=5 の場合、A,CA,C22 つは同じ整数であり、BB11 つだけ異なる整数です。
33 つの整数のうち、11 つだけ異なる整数を求めてください。

制約

  • 100A,B,C100-100≦A,B,C≦100
  • A,B,CA,B,C は整数
  • 入力は問題文の条件を満たす

入力

入力は以下の形式で標準入力から与えられる。

AA BB CC

出力

A,B,CA,B,C のうち、11 つだけ異なる整数を出力せよ。


入力例 1Copy

Copy
5 7 5

出力例 1Copy

Copy
7

問題文の例と同じです。


入力例 2Copy

Copy
1 1 7

出力例 2Copy

Copy
7

この場合は、CC が求める整数です。


入力例 3Copy

Copy
-100 100 100

出力例 3Copy

Copy
-100

Score : 100100 points

Problem Statement

You are given three integers, AA, BB and CC.
Among them, two are the same, but the remaining one is different from the rest.
For example, when A=5,B=7,C=5A=5,B=7,C=5, AA and CC are the same, but BB is different.
Find the one that is different from the rest among the given three integers.

Constraints

  • 100A,B,C100-100 \leq A,B,C \leq 100
  • AA, BB and CC are integers.
  • The input satisfies the condition in the statement.

Input

Input is given from Standard Input in the following format:

AA BB CC

Output

Among AA, BB and CC, print the integer that is different from the rest.


Sample Input 1Copy

Copy
5 7 5

Sample Output 1Copy

Copy
7

This is the same case as the one in the statement.


Sample Input 2Copy

Copy
1 1 7

Sample Output 2Copy

Copy
7

In this case, CC is the one we seek.


Sample Input 3Copy

Copy
-100 100 100

Sample Output 3Copy

Copy
-100


2025-03-26 (Wed)
10:27:23 +00:00