Problem:


Score : 100 points

Problem Statement

You are given three integers, A, B and C.

Among them, two are the same, but the remaining one is different from the rest.

For example, when A=5,B=7,C=5, A and C are the same, but B is different.

Find the one that is different from the rest among the given three integers.  

Constraints

-100 \leq A,B,C \leq 100 

A, B and C are integers.

The input satisfies the condition in the statement.

Input

Input is given from Standard Input in the following format:  

A B C

Output

Among A, B and C, print the integer that is different from the rest.

Sample Input 1

5 7 5

Sample Output 1

7

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

Sample Input 2

1 1 7

Sample Output 2

7

In this case, C is the one we seek.

Sample Input 3

-100 100 100

Sample Output 3

-100



Sample input:
5 7 5


Sample output:
7

Submission status: Accepted

Solution code:
A,B,C = list(map(int, input().strip().split()))
if A == B:
    print(C)
elif A == C:
    print(B)
else:
    print(A)

Submission status: Accepted

Solution code:
# coding: utf-8
# Here your code !
s=list(map(int,input().rstrip().split()))

for i in s:
    if( s.count(i) == 1 ):
        print(i,flush=True)
        break

Submission status: Accepted

Solution code:
a,b,c=[int(i) for i in input().split()]

if a==b:
  print(c)
elif b==c:
  print(a)
else:
  print(b)

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
if(a==b): print(c)
if(b==c) :print(a)
if(a==c) :print(b)

Submission status: Accepted

Solution code:
a,b,c=input().split()

if a==c:
    print(b)
elif b==c:
    print(a)
else:
    print(c)

Submission status: Accepted

Solution code:
import numpy as np

A, B, C = (list(map(int, input().split())))
if(A == B):
  print(C)
elif(A == C):
  print(B)
else:
  print(A)

Submission status: Accepted

Solution code:
def main():
    ABC = tuple(map(int, input().split()))
    print(lonelyInteger(ABC))

def lonelyInteger(array):
    result = 0
    for i in array:
        result ^= i
    return result

main()

Submission status: Accepted

Solution code:
# coding: utf-8
# Here your code !
s=list(map(int,input().rstrip().split()))

for i in s:
    if( s.count(i) == 1 ):
        print(i,flush=True)
        break

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())

if a == b:
    print(c)
elif a == c:
    print(b)
else:
    print(a)

Submission status: Accepted

Solution code:
A,B,C = [int(i) for i in input().split()]

if A==B:
  print(C)
elif A==C:
  print(B)
elif B==C:
  print(A)

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
if A == B:
	print(C)
elif B == C:
	print(A)
else:
	print(B)

Submission status: Accepted

Solution code:
a,b,c = [int(i) for i in input().split()]
print(a if a != b and a!= c else b if b!= a and b != c else c)

Submission status: Accepted

Solution code:
nums=raw_input().split(' ')
if nums[0]!=nums[1]:
 if nums[0]==nums[2]:
  print nums[1]
 else:print nums[0]
else:print nums[2]

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())

if a == b:
    x = c
elif b == c:
    x= a
else:
    x = b

print(x)

Submission status: Accepted

Solution code:
#https://beta.atcoder.jp/contests/abc075
# -*- coding: utf-8 -*-
a,b,c = map(int,input().split())

if a == b : print(c)
if b == c : print(a)
if c == a : print(b)

Submission status: Accepted

Solution code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

A,B,C = map(int,input().split(" "))

if A ==  B:
	print(C)
elif B == C:
	print(A)
else:
	print(B)

Submission status: Accepted

Solution code:
import math,heapq,collections,sys,numpy

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()

a,b,c = LI()
if a == b:
    print(c)
elif b == c:
    print(a)
elif a == c:
    print(b)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
#-*- coding: utf-8 -*-

from collections import defaultdict
from math import factorial as f
from fractions import gcd as g

l = [int (i) for i in raw_input ().split ()]
d = defaultdict (int)
for i in l: d [i] += 1
print [i for i in d if d [i] == 1][0]

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
https://beta.atcoder.jp/contests/abc075/tasks/abc075_a

"""
import sys
from sys import stdin
input = stdin.readline


def main(args):
    A, B, C = map(int, input().split())
    ans = 0
    if A == B:
        ans = C
    elif B == C:
        ans = A
    else:
        ans = B
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
if a == b:
	print(c)
elif b == c:
	print(a)
elif c == a:
	print(b)

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split(' '))
print(a^b^c)

Submission status: Accepted

Solution code:
#! -*- coding:utf-8 -*-
a,b,c = map(int,input().split())

if (a == b):
    print(c)
elif (a == c):
    print(b)
else:
    print(a)

Submission status: Accepted

Solution code:
a,b,c = input().split()
a = int(a)
b = int(b)
c= int(c)

if a == b:
    print(c)
elif b == c:
    print(a)
else:
    print(b)

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())		# 5 7 2


if a==b:
	print(c)
elif a==c:
	print(b)
else:
	print(a)

Submission status: Accepted

Solution code:
A, B, C = raw_input().split()
if A == B:
  print C
elif A == C:
  print B
else:
  print A

Submission status: Accepted

Solution code:
line=input().split()
a=int(line[0])
b=int(line[1])
c=int(line[2])
if (a==b):
    print (c)
elif (b==c):
    print(a)
elif (a==c):
    print(b)

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
a.sort()
print(a[0] if a[1]!=a[0] else a[2])

Submission status: Accepted

Solution code:
*S,=map(int, input().split())
S.sort()
print(S[0] if S[1] == S[2] else S[2])

Submission status: Accepted

Solution code:
X = map(int, raw_input().split())
print sum(X)-(sum(X)-min(X)-max(X))*2

Submission status: Accepted

Solution code:
a, b, c = list(map(int, input().split()))

if a == b:
    print(c)
elif a == c:
    print(b)
else:
    print(a)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
"""

# import {{{
from collections import ChainMap
from collections import Counter
from collections import defaultdict
from collections import deque
from collections import namedtuple
import bisect
import copy
import decimal
import fractions
import functools
import heapq
import itertools
import locale
import math
import operator
import pdb
import pprint
import random
import re
import string
import sys
import time

try:
    import numpy as np
    import scipy as sp
except:
    pass
# }}}

# util {{{
def is_odd(x):
    return x % 2 == 1

def is_even(x):
    return x % 2 == 0

def cmp(x, y):
    return (x > y) - (x < y)

def sgn(x):
    return cmp(x, 0)

def clamp(x, lo, hi):
    assert lo <= hi
    if x < lo:
        return lo
    elif x > hi:
        return hi
    else:
        return x

def chmax(xmax, x):
    if x > xmax:
        return x, True
    else:
        return xmax, False

def chmin(xmin, x):
    if x < xmin:
        return x, True
    else:
        return xmin, False

def argmax(seq):
    return max(range(len(seq)), key=seq.__getitem__)

def argmin(seq):
    return min(range(len(seq)), key=seq.__getitem__)

def INPUT():
    return input().rstrip() # CRLF対策

sys.setrecursionlimit(100000)

locale.setlocale(locale.LC_ALL, "C")
# }}}

# 適宜調整
PINF = float("inf")
NINF = float("-inf")
EPS  = 1e-9



def main():
    X = list(map(int, input().split()))

    X.sort()
    if X[0] == X[1]:
        print(X[2])
    elif X[1] == X[2]:
        print(X[0])

if __name__ == "__main__": main()

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    A, B, C = map(int, input().split())
    if A == B:
        print(C)
    elif B == C:
        print(A)
    else:
        print(B)

Submission status: Accepted

Solution code:
A,B,C = input().split()

if A == B:
    print(C)
elif A == C:
    print(B)
else:
    print(A)

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
if A == B: print(C)
elif B == C: print(A)
else: print(B)

Submission status: Accepted

Solution code:
# A
A, B, C = map(int, input().split())
if A == B:
    print(C)
elif B == C:
    print(A)
else:
    print(B)

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
INF = float("inf")


def main():
    A, B, C = map(int, input().split())
    if A == B:
        print(C)
    elif A == C:
        print(B)
    elif B == C:
        print(A)



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b, c = [int(i) for i in input().split(" ")]


if a == b:
    print(c)
elif b == c:
    print(a)
elif a == c:
    print(b)

Submission status: Accepted

Solution code:
A, B, C = list(map(int, input().split()))
if A == B:
    print(C)
elif B == C:
    print(A)
else:
    print(B)

Submission status: Accepted

Solution code:
A, B, C = map(int, raw_input().split()) 
if A == B:
    print C
elif A == C:
    print B
else:
    print A

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

a,b,c = na()
print(a^b^c)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    a = LI()
    if a[0] == a[1]:
        return a[2]
    if a[0] == a[2]:
        return a[1]

    return a[0]


print(main())

Submission status: Accepted

Solution code:
a, b, c = map(int, raw_input().split())
if a == b:
    print c
elif b == c:
    print a
else:
    print b

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())

if a==b:
    ans=c
elif b==c:
    ans=a:
else:
    ans=b
print(a+b+c-ans)

Submission status: Runtime Error

Solution code:
a,b,c=list(map(int,input().split()))
if a==b:
  print(c)
elif b==c:
  print(a)
eles:
  print(b)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
if a==b:
  print(c)
elif b==c:
  print(a):
else:
  print(b)

Submission status: Runtime Error

Solution code:
h,w=map(int,input().split())

l=[list(input()) for i in range(h)]
ans=[[0]*w for i in range(h)]

for i in range(h):
  for j in range(w):
    if l[i][j]=="#":
      ans[i][j]=="#"
    else:
      for a in range(-1,2):
        for b in range(-1,2):
          if i+a<h and j+b<w ansl[i+a][j+b]=="#":
            ans[i][j]+=1
            
for i in range(h):
  print(*ans[i], sep='')

Submission status: Runtime Error

Solution code:
l = liet(map(int, input().split()))
for ll in l:
    if l.count(ll)==1:
        print(ll)
        break

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input.split())

if a == b:
    print(c)
elif a == c:
    print(b) 
else:
    print(a)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())

print(a ^ b ^ c)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
print(a if b=c else b if a=c else c)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
print(a if b=c b elif a=c  c else)

Submission status: Runtime Error

Solution code:
a = map(int,input().split())

for i in a:
  if a.count(i) > 1:
    print(i)
    break

Submission status: Runtime Error

Solution code:
al=list(map(int,input.split()))
al.sort()
print(sum(al)-al[1]*2)

Submission status: Runtime Error

Solution code:
if a==b: print(c)
elif a==c: print(b)
else: print(a)

Submission status: Runtime Error

Solution code:
h,w = map(int,input().split())
ls = []
side = [[-1,-1],[-1,0],[-1,1],[0,-1],[0,1],[1,-1],[1,0],[1,1]]
for i in range(h):
  ls.append(list(input()))
for i in range(h):
  ans2 = ""
  for j in range(w):
    ans = 0
    if ls[i][j] == "#":
      ans2 += "#"
    else:
      for k in range(8):
        if i+side[k][0] < 0 or j+side[k][1] < 0 or h <=i+side[k][0] or w <= j+side[k][1]:
          continue
        else:
          ans += (1 if ls[i+side[k][0]][j+side[k][1]] == "#" else 0)
      ans2 += str(ans)
  print(ans2)

Submission status: Runtime Error

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    A, B, C == map(int, readline().split())
    if A == B:
        print(C)
    elif B == C:
        print(A)
    else:
        print(B)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    A, B, C == map(int, readline().split())
    if A == B:
        print(C)
    elif B == C:
        print(A)
    else:
        print(bin())


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
print(a if b == c else b if a == c else c if a == b)

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
print(a if a not in [b, c] else b if b not in [a, c] else c if c not in [a, b])

Submission status: Runtime Error

Solution code:
List = list(map(int, input().split()))
res = 0
for i in range(3):
  for j in range(i,3):
    if List[i] == List[j]:
      res = 6 - i+1 -j+1
print(List[res])

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().slpit())
 
if A==B:
  print(C)
elif B==C:
  print(A)
else:
  print(B)

Submission status: Runtime Error

Solution code:
A, B, C=map(int, input().slpit())
 
if A==B:
  print(C)
elif B==C:
  print(A)
else:
  print(B)

Submission status: Runtime Error

Solution code:
A, B, C = map(int,input().slpit())
 
if A==B:
  print(C)
elif B==C:
  print(A)
else:
  print(B)

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().slpit())
 
if A==B:
  print(C)
elif B==C:
  print(A)
else:
  print(B)

Submission status: Runtime Error

Solution code:
A,B,C=map(int, input().slpit())
 
if A==B:
  print(C)
elif B==C:
  print(A)
else:
  print(B)

Submission status: Runtime Error

Solution code:
A,B,C=map(int,input().slpit())

if A==B:
  print(C)
elif B==C:
  print(A)
else:
  print(B)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
 
if A==B:
  print(C)
elif B==C:
  print(A)
else:
  print(B)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())

if A=B:
  print(C)
elif B=C:
  print(A)
else:
  print(B)

Submission status: Runtime Error

Solution code:
A = list(map(int,input().split()))
B = set(A)
if A.count(B[0]) == 1:
  print(B[0])
else:
  print(B[1])

Submission status: Runtime Error

Solution code:
# coding: utf-8
# hello worldと表示する
#float型を許すな
#numpyはpythonで
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

n,k=MI()
lis=[LI() for i in range(n)]
lis.sort()
s=[]
for i in range(n):
    for j in range(n):
        for k in range(n):
            for l in range(n):
                xl=min(lis[i][0],lis[j][0])
                xu=max(lis[i][0],lis[j][0])
                yl=min(lis[k][1],lis[l][1])
                yu=max(lis[k][1],lis[l][1])
                count=0
                for m in range(n):
                    if xl<=lis[m][0]<=xu and yl<=lis[m][1]<=yu:
                        count+=1
                if count>=k:
                    s.append((xu-xl)*(yu-yl))
print(max(s))

Submission status: Runtime Error

Solution code:
def bakudanda (y,x):
  if y < 0 or y >= len(s):
    return 0
  if x < 0 or x >= len(s[y]):
    return 0
  if s[y][x] == '#':
    return 1
  else:
    return 0
H,W = map(int,input().split())
s=[]
for i in range(H):
  s.append(input())
  
for i in range(len(s)):
  a = s[i]
  fp = ''
  for j in range(len(a)):
    if a[j] == '.':
      c = 0
      ds = [(-1, -1), (-1, 0), (-1, 1), (0, -1), (0,1), (1, -1), (1, 0), (1, 1)]
      for (y, x) in ds:
        c+= bakudanda(i+y,j+x)
      fp += str(c)
    else:
      fp += '#'
  print(fp)

Submission status: Runtime Error

Solution code:
# For taking integer inputs.
import math
 
 
def inp():
    return(int(input()))
 
 
# For taking List inputs.
def inlist():
    return(list(map(int, input().split())))
 
 
# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable.
def instr():
    s = input()
    return(list(s[:len(s)]))
 
 
# For taking space seperated integer variable inputs.
def invr():
    return(map(int, input().split()))
 
 
def valid(x, y): return True if x >= 0 and x < row and y >= 0 and y < col else False
 
 
fx = [+0, +0, +1, -1, -1, +1, -1, +1]
fy = [-1, +1, +0, +0, +1, +1, -1, -1]
row, col = invr()
mat = []
for _ in range(row):
    mat.append(instr())
 
for i in range(row):
    for j in range(col):
        if mat[i][j] == ".":
            count = 0
            for k in range(len(fx)):
                nx = i + fx[k]
                ny = j + fy[k]
                if valid(nx, ny):
                    if mat[nx][ny] == "#":
                        count += 1
            mat[i][j] = str(count)
 
for r in mat:
    for i in r:
        print(i, end="")
    print()

Submission status: Runtime Error

Solution code:
a,b,c =int(input())
if a == b:
  print(c)
elif  b == c:
  print(a)
else:
  print(b)

Submission status: Runtime Error

Solution code:
a,b,c = map(int, input().split())

if a==b:
  print(c)
elif a==c:
  print(b)
else b==c:
  print(a)

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())

if a == b:
  input(c)
elif b == c:
  input(a)
else:
  input(b)

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())

if a = b:
  input(c)
elif b = c:
  input(a)
else:
  input(b)

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input(),split())
if A == B:
    print(C)
elif B == C:
    print(A)
else:
    print(B)

Submission status: Runtime Error

Solution code:
import sys


def check(newLine, index, row, col):
    count = 0
    # 左と右
    if index % col != 0:
        if newLine[index - 1] == "#":
            count += 1
    if index % col != col - 1:
        if newLine[index + 1] == "#":
            count += 1
    # 上と下
    if index > col:
        if newLine[index - col] == "#":
            count += 1
    if index < col * (row - 1):
        if newLine[index + col] == "#":
            count += 1

    # 上の左と右 0 <= index + col + 1 < len(newLine) and
    if index > col and index % col != 0:
        if newLine[index - col - 1] == "#":
            count += 1
    if index > col and index % col != col - 1:
        if newLine[index - col + 1] == "#":
            count += 1
    # 下の左と右
    if index < col * (row - 1) and index % col != 0:
        if newLine[index + col - 1] == "#":
            count += 1
    if index < col * (row - 1) and index % col != col - 1:
        if newLine[index + col + 1] == "#":
            count += 1

    newLine[index] = str(count)
    return newLine


def main(lines):
    row = int(lines[0][0])
    col = int(lines[0][2])

    newLine = list("".join(lines[1:]))
    for index, value in enumerate(newLine):
        if value == ".":
            newLine = check(newLine, index, row, col)
    for i in range(0, len(newLine), col):
        print("".join(newLine[i:i + col]))


if __name__ == '__main__':
    # lines = ['6 6', '#####.', '#.#.##', '####.#', '.#..#.', '#.##..', '#.#...']
    # lines = ['6 5', '.##.#', '.####', '..##.', '..#..', '.....', '.....']
    # lines = ['3 5', '.....', '.#.#.', '.....']

    lines = []
    for l in sys.stdin:
       lines.append(l.rstrip('\r\n'))
    main(lines)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
if a==b:
  print(int(input()))
  exit()
if int(input())==a:
  print(b)
else:
  print(a)

Submission status: Runtime Error

Solution code:
# -*- coding: <encoding name> -*-

a, b, c = map(int, input())
print('a' if b ==c else 'b' if c == a else 'c')

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input(),split())
print(A if B == C else B if A == C else C)

Submission status: Runtime Error

Solution code:
if a == b and a != c:
    print(c)
elif a != b and a == c:
    print(b)
else:
    print(a)

Submission status: Runtime Error

Solution code:
from copy import deepcopy

def warshallfloyd(cost,V):
    INF = float("inf")
    for k in range(V):
        for i in range(V):
            for j in range(V):
                if cost[i][k]!=INF and cost[k][j]!=INF:
                    cost[i][j] = min(cost[i][j], cost[i][k] + cost[k][j])

    for i in cost:
        if float("inf") in i:
            return False
    
    return True

N,M = map(int,input().split())
edge = [[float("inf") for i in range(N)] for j in range(N)]

for _ in range(M):
    a,b = map(int,input().split())
    edge[a-1][b-1] = 1
    edge[b-1][a-1] = 1

ans = 0

for i in range(N-1):
    for j in range(i+1,N):
        if edge[i][j]:
            tmp = deepcopy(edge)
            tmp[i][j] = float("inf")
            tmp[j][i] = float("inf")
            if not warshallfloyd(tmp,N):
                ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
#Nはノード数、Mはエッジ数
n,m = map(int, input().split())

ab = [list(map(int, input().split())) for i in range(m)]

cnt=0

for x in ab:
  ls=list(range(n))
  for y in ab:
    if y !=x:
      for i in range(n)
        ls=[ls[y[0]-1] if ls[i]==ls[y[1]-1] else ls[i] for i in range(n)] #bの値を根っこ（低い方a）にする
  if len(set(ls)) !=1:
    cnt+=1

print(cnt)

Submission status: Runtime Error

Solution code:

A, B, C = map(int, input().split())

print(C if A == B else B if A == C else A if B == C)

Submission status: Runtime Error

Solution code:
import Collections
a,b,c=map(int,input().split())
n=[a,b,c]
d,e=zip(*n.most_common())
d=list(d)
print(d[-1])

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
print(a if b==c else b if a==c else c if a==b)

Submission status: Runtime Error

Solution code:
import sys
import numpy as np

readline = sys.stdin.readline

n = np.array(readline().split(), dtype=np.int64)

a = np.array(list(np.unique(n, return_counts=True))).T
ans = a[:,0][np.where(a[:,1] == 1)]
print(*ans)

Submission status: Runtime Error

Solution code:
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():

    l=list(map(int,input().split()))
    for i in l:
        if l.count(i)==1:
            print(i)
            break
resolve()

Submission status: Runtime Error

Solution code:
# solution
import io
import math

nim, mike = map(int, input().split())
data = [['.'] * (mike+2)]
data += [['.'] + list(input()) + ['.'] for _ in range(nim)]
data += [['.'] * (mike+2)]

result = []
for i in range(1, nim + 1):
  strings = str()
  for j in range(1, mike + 1):
    counter = 0
    if data[i][j] == '.':
      for k in range(-1, 2, 1):
        for l in range(-1, 2, 1):
          if data[i+k][j+l] == '#':
            counter += 1
      strings += str(counter)
    else:
      strings += '#'
  result += [strings]
    
for i in result:
  print (i)

Submission status: Runtime Error

Solution code:
L = list(map(int,input().split()))
M =L.sort()
if M[0]==M[1]:
  print(M[2])
else:
  print(M[0])

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())

if a == b:
    print(c)
elif a == c:
    print(b)
elif b == c:
    pritn(a)

Submission status: Runtime Error

Solution code:
a=int(input("enter a"))
b=int(input("enter b"))
c=int(input("enter c"))
if a<=100 and a>=-100 and b<=100 and b>=-100 and c<=100 and c>=-100:
    if a==b:
        print(c)
    elif a==c:
        print(b)
    elif c==b:
        print(a)

Submission status: Runtime Error

Solution code:
def resolve():
    from scipy.sparse.csgraph import connected_components  # https://note.nkmk.me/python-scipy-connected-components/
    from scipy.sparse import csr_matrix

    N, M = map(int, input().split())  # 頂点数、辺数
    A, B, C = [0] *  M, [0] * M, [1] * (M-1)
    for i in range(M):
        A[i], B[i] = map(int, input().split())
        A[i]-=1
        B[i]-=1

    cnt = 0
    for i in range(M):
        #print(B[:i] + B[i + 1:i + M] + B[i + M + 1:])
        #print(A[:i] + A[i + 1:i + M] + A[i + M + 1:])
        csr = csr_matrix((C, (A[:i] + A[i + 1:], B[:i] + B[i + 1:])), shape=(N, N))
        #print(csr)
        #print('haha')
        n, labels = connected_components(csr)
        if n == 2:
           cnt += 1
    print(cnt)


resolve()

Submission status: Runtime Error

Solution code:
def input(): return sys.stdin.readline().strip()


def resolve():
    from scipy.sparse.csgraph import connected_components  # https://note.nkmk.me/python-scipy-connected-components/
    from scipy.sparse import csr_matrix

    N, M = map(int, input().split())  # 頂点数、辺数
    A, B, C = [0] *  M, [0] * M, [1] * (M-1)
    for i in range(M):
        A[i], B[i] = map(int, input().split())
        A[i]-=1
        B[i]-=1

    cnt = 0
    for i in range(M):
        #print(B[:i] + B[i + 1:i + M] + B[i + M + 1:])
        #print(A[:i] + A[i + 1:i + M] + A[i + M + 1:])
        csr = csr_matrix((C, (A[:i] + A[i + 1:], B[:i] + B[i + 1:])), shape=(N, N))
        #print(csr)
        #print('haha')
        n, labels = connected_components(csr)
        if n == 2:
           cnt += 1
    print(cnt)


resolve()

Submission status: Runtime Error

Solution code:
a,b,c = map(int,inout().split())
if a == b:
  print(c)
elif b == c:
  print(a)
else:
  print(b)

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input())
if a == b:
  print(c)
elif b == c:
  print(a)
else:
  print(b)

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input()split())

if A == B:
	answer = C
elif B == C:
	answer = A
elif A ==C:
	answer = B

print(answer)

Submission status: Runtime Error

Solution code:
a,b,c = int(map(input().split()))
if a == b:
    print(c)
elif a == c:
    print(b)
else:
    print(a)

Submission status: Runtime Error

Solution code:
a, b, c = [int(i) for i in input().splt()]

if a == b:
  print(c)
elif b == c:
  print(a)
else:
  print(b)

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
print(a if b==c else b if a==c else c if a==b)

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
print('a' if b==c else 'b' if a==c else 'c' if a==b)

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
print('a' if b==c else 'b' if a==c else 'c' if a=b)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,raw_input().split())
if a ==b and a!=c:
  print c
elif b == c and b != a:
  print a 
elif: a==c and a !=b:
  print b

Submission status: Runtime Error

Solution code:
S=list(map(int,input().split()))
for i in range(2):
    if count(S[i])==1:
        print(S[i])

Submission status: Runtime Error

Solution code:
A= int(input())
B= int(input())
C= int(input())

if A&B&C >= -100 and A&B&C <= 100:
    if A-B==0:
        diff=C
    elif A-C==0:
        diff=B
    elif B-C==0:
        diff=A
        
print ("The different number is " , diff )

Submission status: Runtime Error

Solution code:
A= int(input("first"))
B= int(input())
C= int(input())

if A&B&C >= -100 and A&B&C <= 100:
    if A-B==0:
        diff=C
    elif A-C==0:
        diff=B
    elif B-C==0:
        diff=A
        
print ("The different number is " , diff )

Submission status: Runtime Error

Solution code:
a, b, c = list(map(int, input().split()))
if a==b:
  print(c)
elif a==c:
  print(b):
else:
  print(a)

Submission status: Runtime Error

Solution code:
h,w = map(int,input().split())
a = ["." for i in range(w+2)]
dot_map = [a]
for _ in range(h):
    l = list(input())
    l.insert(0, ".")
    l.append(".")
    dot_map.append(l)
dot_map.append(a)

for i in range(1, h+1):
    for j in range(1,w+1):
        if dot_map[i][j] == ".":
            counter = 0
            if dot_map[i-1][j-1] == "#":
                counter += 1
            if dot_map[i-1][j] == "#":
                counter += 1
            if dot_map[i-1][j+1] == "#":
                counter += 1
            if dot_map[i][j-1] == "#":
                counter += 1
            if dot_map[i][j+1] == "#":
                counter += 1
            if dot_map[i+1][j-1] == "#":
                counter += 1
            if dot_map[i+1][j] == "#":
                counter += 1
            if dot_map[i+1][j+1] == "#":
                counter += 1
            dot_map[i][j] = counter

for i in range(1, h+1):
    ans = dot_map[i]
    print("".join(ans[1:w+1]))

Submission status: Runtime Error

Solution code:
a,b,c = int(input().split())
if a==b:
  print(c)
elif b==c:
  print(a)
else:
  print(b)

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input())
if a==b:
  print(c)
elif b==c:
  print(a)
else:
  print(b)

Submission status: Runtime Error

Solution code:
a, b = map(int,input().split())
list_ = [input() for _ in range(a)]
 
for i in range(a):
  s = ''
  for j in range(b):
    #print(list_[max(0, i-1): min(a, i+2)])
    if(list_[i][j] == '#'):
      s += '#'
    else:
      p = 0
      for q in list_[max(0, i-1): min(a, i+2)]:
        p += q[max(0, j-1): min(b, j+2)].count('#')
      s += str(p)
  print(s)

Submission status: Runtime Error

Solution code:
a, b, c = int(input().split())

if a == b:
  print(c)
elif b == c:
  print(a)
elif a == c:
  print(b)

Submission status: Runtime Error

Solution code:
a=input().list()
a=sorted(a)
print(a[2])

Submission status: Runtime Error

Solution code:
H, W = map(int, input().split())
area = []
for i in range(H):
  area.append(input())

for i in range(H):
  for j in range(W):
    if area[i][j] == '#':
      print('#', end='')
    else:
      count = 0
      for k in range(max(0, i-1), min(i+1, H-1)+1):
        for l in range(max(0, j-1), min(j+1, W-1)+1):
          if area[k][l] == '#':
            count += 1
      print(count, end='')
  print()