Problem:


Score: 100 points

Problem Statement

Takahashi is solving quizzes. He has easily solved all but the last one.

The last quiz has three choices: 1, 2, and 3.

With his supernatural power, Takahashi has found out that the choices A and B are both wrong.

Print the correct choice for this problem.

Constraints

Each of the numbers A and B is 1, 2, or 3.

A and B are different.

Input

Input is given from Standard Input in the following format:

A
B

Output

Print the correct choice.

Sample Input 1

3
1

Sample Output 1

2

When we know 3 and 1 are both wrong, the correct choice is 2.

Sample Input 2

1
2

Sample Output 2

3



Sample input:
3
1


Sample output:
2

Submission status: Accepted

Solution code:
print(6-sum(map(int, open(0).read().split())))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
ans = 6 - a - b
print(ans)

Submission status: Accepted

Solution code:
a = input()
b = input()
no = {a,b}
for s in ['1','2','3']:
    if(not s in no):
        print(s)

Submission status: Accepted

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

if A * B == 2:
    print(3)
elif A * B == 3:
    print(2)
else:
    print(1)

Submission status: Accepted

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

L=[1,2,3]
L.remove(A)
L.remove(B)

print(*L)

Submission status: Accepted

Solution code:
a=input()
b=input()
ans='123'
print(ans.replace(a,'').replace(b,''))

Submission status: Accepted

Solution code:
#--Round One
A = int(input())
B = int(input())

print(6-A-B)

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
tmp = A + B
print(1 if tmp==5 else 2 if tmp==4 else 3)

Submission status: Accepted

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

if A*B == 2:
    print(3)
elif A*B == 3:
    print(2)
else:
    print(1)

Submission status: Accepted

Solution code:
num1 = int(input())
num2 = int(input())

for i in range(1,4):
  if i!=num1 and i!=num2:
    print(i)

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
ans=[1,2,3]
ans.remove(a)
ans.remove(b)
print(ans[0])

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
print(6-(a+b))

Submission status: Accepted

Solution code:
y=[1,2,3]
A = int(input())
B= int(input())
y.remove(A)
y.remove(B)
print(y[0])

Submission status: Accepted

Solution code:
y=[1,2,3]
A = int(input())
B= int(input())
if A==1 or B==1:
    y.remove(1)
if A==2 or B==2:
    y.remove(2)
if A==3 or B==3:
    y.remove(3)
print(y[0])

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
print(int(6/(a*b)))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a = int(input())
b = int(input())
print(6 - a - b)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a = int(input())
b = int(input())
l = [1, 2, 3]
l.remove(a)
l.remove(b)
print(l[0])

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

a = int(readline())
b = int(readline())
ans = [1, 2, 3]
for i in ans:
    if i != a and i != b:
        print(i)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
lst = [1,2,3]
lst.remove(a)
lst.remove(b)
print(lst[0])

Submission status: Accepted

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

total = 6

ans = 6 - A - B

print(ans)

Submission status: Accepted

Solution code:
l = [1,2,3]
for i in range (2):
  l.remove(int(input()))
print(l[0])

Submission status: Accepted

Solution code:
ans=["1","2","3"]

for i in range(2):
    num=input()
    ans.remove(num)
print(ans[0])

Submission status: Accepted

Solution code:
ans=["1","2","3"]

for i in range(2):
    num=input()
    ans.remove(num)
print(ans[0])

Submission status: Accepted

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

if(A+B==3):
    print(3)
elif(A+B==4):
    print(2)
else:
    print(1)

Submission status: Accepted

Solution code:
choice = {1, 2, 3}
magic = set()
A = magic.add(int(input()))
B = magic.add(int(input()))

print(list(choice - magic)[0])

Submission status: Accepted

Solution code:
# 初期入力
L = [int(input()) for i in range(2)]

#
all_x = [1,2,3]
for i in L:
    all_x.remove(i)

print(all_x[0])

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
N = [1,2,3]
N.remove(A)
N.remove(B)
print(int(N[0]))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

List = {a, b}

if List == {1, 2}:
  print(3)
if List == {2, 3}:
  print(1)
if List == {3, 1}:
  print(2)

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
TOTAL = 6

answer = TOTAL - A - B

print(answer)

Submission status: Accepted

Solution code:
res=0

for i in range(2):
    t=int(input())
    res += t

print(6-res)

Submission status: Accepted

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

C = 6 - A - B

print(C)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

for i in range(1, 4):
    if i != a and i != b:
        print(i)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(A: int, B: int):
    answers = set([1, 2, 3])
    answers.remove(A)
    answers.remove(B)
    for i in answers:
        print(i)
        exit()
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
print(6-(A+B))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import Counter, deque

INF = float('inf')


def main():
    A = int(input())
    B = int(input())
    print(6 - A - B)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import Counter, deque

INF = float('inf')


def main():
    A = int(input())
    B = int(input())

    if A + B == 3:
        print(3)
    elif A + B == 4:
        print(2)
    else:
        print(1)
    

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A=int(input())
B=int(input())
if (A,B)==(2,3) or(A,B)==(3,2):
    print(1)
elif (A,B)==(1,3) or (A,B)==(3,1):
    print(2)
elif (A,B)==(1,2) or (A,B)==(2,1):
    print(3)

Submission status: Accepted

Solution code:
a = [1,2,3]
a.remove(int(input()))
a.remove(int(input()))
print(a[0])

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
print(6 - (A + B))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

print(6 - (a + b))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

c = a + b
print(6 - c)

Submission status: Accepted

Solution code:
from sys import stdin

A = int(stdin.readline().rstrip())
B = int(stdin.readline().rstrip())

print(6 - (A + B))

Submission status: Accepted

Solution code:
A= int(input())
B= int(input())
if 1!=A and 1!=B:
  print('1')
elif 2!=A and 2!=B:
  print('2')
else:
  print('3')

Submission status: Accepted

Solution code:
a=input()
b=input()
if a==1 and b==2:
  print "3"
elif a==2 and b==3:
  print "1"
elif a==3 and b==1:
  print "2" 
elif a==3 and b==2:
  print "1"
elif a==2 and b==1:
  print "3"
else:
  print "2"

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
num = [1,2,3]
num.remove(a)
num.remove(b)
print(num[0])

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
print(a^b)

Submission status: Accepted

Solution code:
# ABC 148: A – Round One
a, b = [int(input()) for _ in range(2)]
print(6 - a - b)

Submission status: Accepted

Solution code:
a, b = [int(input()) for i in range(2)]
for i in range(1,4):
    if i != a and i != b: print(i)

Submission status: Accepted

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


def main():
    A = int(input())
    B = int(input())

    ans = {1, 2, 3} - {A, B}
    print(list(ans)[0])


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
func = lambda A, B: 6-(A+B)
print(func(A,B))

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
opt=[1,2,3]
opt.remove(a)
opt.remove(b)
print(opt[0])

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
d = [1,1,1]
d[a-1] -= 1
d[b-1] -= 1
for i, num in enumerate(d):
  if num:
    print(i+1)
    break

Submission status: Accepted

Solution code:
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A = ir()
B = ir()
S = {A, B}
for x in [1, 2, 3]:
    if x not in S:
        print(x)
# 42

Submission status: Accepted

Solution code:
a_list=[1,2,3]
p= input()
q=input()
a_list.remove(int(p))
a_list.remove(int(q))
print(a_list[0])

Submission status: Accepted

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

sum = A + B
ans = 6 - sum

print(ans)

Submission status: Accepted

Solution code:
a=input()
b=input()
print("123".replace(a,"").replace(b,""))

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
ABC = {1, 2, 3}
AB = {A, B}
print(list(ABC-AB)[0])

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

list = [1,2,3]

if a == 1 and b == 2:
  print(3)
if a == 2 and b == 3:
  print(1)
if a == 3 and b == 1:
  print(2)
if a == 1 and b == 3:
  print(2)
if a == 2 and b == 1:
  print(3)
if a == 3 and b == 2:
  print(1)

Submission status: Accepted

Solution code:
import itertools
import fractions
def main():
  s = [1,2,3]
  s.remove(int(input()))
  s.remove(int(input()))
  print(s[0])
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
ans = [1,2,3]
for i in range(2):
    ans.remove(int(input()))
print(ans[0])

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
if (a==1 and b==2) or (a==2 and b==1):
    print(3)
if (a==1 and b==3) or (a==3 and b==1):
    print(2)
if (a==2 and b==3) or (a==3 and b==2):
    print(1)

Submission status: Accepted

Solution code:
s = int(input())
t = int(input())

ans = [1,2,3]
ans.remove(s)
ans.remove(t)
print(ans[0])

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
question = [1,2,3]
question.remove(a)
question.remove(b)
print(question[0])

Submission status: Accepted

Solution code:
x=[int(input()) for i in range(2)]
for i in range(1,4):
    if i not in x:
        print(i)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

if a*b==2:
    print(3)
elif a*b==3:
    print(2)
else:
    print(1)

Submission status: Accepted

Solution code:
import sys

def solve():
    A = int(input())
    B = int(input())
    Num = set([A, B])
    All = set([1, 2, 3])
    All -= Num
    for key in All: print(key)

    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

print(6-A-B)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
b = int(input())

"""
tmp = [a, b]
tmp.sort()
if tmp[0] == 2:
    print(1)
if tmp[0] == 1 and tmp[1] == 3:
    print(2)
else:
    print(3)
"""

if (a == 1 and b == 2) or (b == 1 and a == 2):
    print(3)
elif (a == 2 and b == 3) or (b == 2 and a == 3):
    print(1)
else:
    print(2)

Submission status: Accepted

Solution code:
def resolve():

    ans={1,2,3}
    L={int(input()) for i in range(2)}
    for i in ans-L:
        print(i)

resolve()

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
ans = 6-a-b
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

a = int(input())
b = int(input())
print(6-a-b)

Submission status: Accepted

Solution code:

a = int(input())
b = int(input())
print(6-a-b)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
for i in range(1, 4):
    if i != a and i != b:
        print(i)
        exit()

Submission status: Accepted

Solution code:
def solve():
    a=int(input())
    b=int(input())
    print(6-a-b)
if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]

a = INT()
b = INT()
arr = [1, 2, 3]
for i in range(3):
    if a != arr[i] and b != arr[i]:
        print(arr[i])

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

print(a^b)

Submission status: Accepted

Solution code:
A = [int(input()) for _ in range(2)]

for i in range(1, 4):
    if not i in A:
        print(i)

Submission status: Accepted

Solution code:
import sys

a = set(map(int, sys.stdin.read().split()))

def main():
    for i in range(1, 4):
        if not i in a:
            print(i)
            return

if __name__ ==  '__main__':
    main()

Submission status: Accepted

Solution code:
#coding:utf-8
import sys,os
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    XLMIIS = lambda x: [LMIIS() for _ in range(x)]
    YN = lambda c : print('Yes') if c else print('No')
    MOD = 10**9+7

    ans = 6
    print(ans//II()//II())

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

if a+b == 3:
  print(3)
elif a+b == 4:
  print(2)
else:
  print(1)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

print(6-a-b)

Submission status: Accepted

Solution code:
A=int(input())
B=int(input())
if (A !=1)and(B !=1):
    print("1")
elif (A !=2)and(B !=2):
    print("2")
else:
    print("3")

Submission status: Accepted

Solution code:
A=int(input())
B=int(input())
answer=[1,2,3]
print([i for i in answer if i !=A and i!= B][0])
#answer=answer.remove(B)
#print(answer[0])

Submission status: Accepted

Solution code:
A=int(input())
B=int(input())
if (A==1 and B==2) or (A==2 and B==1):
    print(3)
elif (A==2 and B==3) or (A==3 and B==2):
    print(1)
else:
    print(2)

Submission status: Accepted

Solution code:
a = input()
b = input()
l = ['1','2','3']
l.remove(a)
l.remove(b)

print(l[0])

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 6)  # 再帰関数の再帰の深さを設定
to_index = lambda x: int(x) - 1  # 入力した数字に1を引いたものを返す
print_list_in_2D = lambda x: print(*x, sep="\n")  # リストの要素を改行を挟んで表示する関数

# 入力を整数に変換して受け取る
def input_int(): return int(input())

def map_int_input(): return map(int, input())

MII = map_int_input

def MII_split(): return map(int, input().split())

def MII_to_index(): return map(to_index, input())

def MII_split_to_index(): return map(to_index, input().split())

# 入力全てを整数に変換したものの配列を受け取る
def list_int_inputs(): return list(map(int, input()))

LII = list_int_inputs

def LII_split(): return list(map(int, input().split()))

# 2次元リスト化
def LII_2D(rows_number): return [LII() for _ in range(rows_number)]

def LII_split_2D(rows_number): return [LII_split() for _ in range(rows_number)]

A = input_int()
B = input_int()

ans = set([1, 2, 3]) - set([A, B])

print(list(ans)[0])

Submission status: Accepted

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

if A == 1 and B == 2:
    print(3)

if A == 1 and B == 3:
    print(2)

if A == 2 and B == 1:
    print(3)

if A == 2 and B == 3:
    print(1)

if A == 3 and B == 1:
    print(2)

if A == 3 and B == 2:
    print(1)

Submission status: Accepted

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

if A+B == 3:
  print(3)
elif A+B == 4:
  print(2)
else:
  print(1)

Submission status: Accepted

Solution code:
a, b = int(input()), int(input())
ans = 1 if 1 not in (a, b) else 2 if 2 not in (a, b) else 3
print(ans)

Submission status: Accepted

Solution code:
a = int(input())
b=int(input())
c = [1,2,3]
c.remove(a)
c.remove(b)
print(c[0])

Submission status: Accepted

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

ans_set = set(["1", "2", "3"])
ans_set.discard(A)
ans_set.discard(B)

print(ans_set.pop())

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

if a!=1 and b!=1:
  print(1)
elif a!=2 and b!=2:
  print(2)
else:
  print(3)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

ans_list = [1, 2, 3]

ans_list.remove(a)
ans_list.remove(b)

print(ans_list[0])

Submission status: Accepted

Solution code:
import sys
array=[]
for line in sys.stdin.readlines():
    array.append(line.rstrip())
if not  "1" in array:
       print("1")

elif  not "2" in array:
    print("2")

elif  not "3" in array:
   print("3")

Submission status: Accepted

Solution code:
A=int(input())
B=int(input())
print(list({1,2,3}-{A,B})[0])

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())

c=[1,2,3]
c[a-1]=0
c[b-1]=0

print(max(c))

Submission status: Accepted

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

print(6-A-B)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

if a == 1 and b == 2:
  print(3)
elif a == 1 and b == 3:
  print(2)
elif b == 1 and a == 2:
  print(3)
elif b == 1 and a == 3:
  print(2)
elif b == 2 and a == 3:
  print(1)
elif b == 3 and a == 2:
  print(1)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

lst = [1,2,3]

lst.remove(a)
lst.remove(b)

print(lst[0])

Submission status: Accepted

Solution code:
#S,T = map(int,input().split())
#S,T = input().split()
#S = input()
A = int(input())
B = int(input())
print(6-(A+B))

Submission status: Accepted

Solution code:
data = [int(input()), int(input())]

if not(1 in data):
  print(1)
elif not(2 in data):
  print(2)
elif not(3 in data):
  print(3)

Submission status: Accepted

Solution code:
data = [input(), input()]

if not('1' in data):
  print(1)
elif not('2' in data):
  print(2)
elif not('3' in data):
  print(3)

Submission status: Accepted

Solution code:
A=int(input())
B=int(input())
if A!=1 and B!=1:
  print(1)
elif A!=2 and B!=2:
  print(2)
else:
  print(3)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
if a*b==2:
  print ('3')
elif a*b==3:
  print ('2')
else:
  print ('1')

Submission status: Accepted

Solution code:
List=[1,2,3]
a=int(input())
b=int(input())
List.remove(a)
List.remove(b)
print(List[0])

Submission status: Accepted

Solution code:
# 参考: https://qiita.com/y-tsutsu/items/aa7e8e809d6ac167d6a1

import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

# 多次元配列
# dp = [[0] * 3 for _ in range(5)]

# 入力を受け取る
A = int(input())
B = int(input())

if A * B == 2:
    print(3)
elif A * B == 3:
    print(2)
else:
    print(1)

Submission status: Accepted

Solution code:
a = {1, 2, 3}
b = set()
for i in range(2):
  b.add(int(input()))
print(*(a - b))

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
for i in range(1,4):
  if i != A and i != B:
    print(i)

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
for i in [1,2,3]:
    if i != A and i != B:
        print(i)

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
if A + B == 3:
    print("3")
if A + B == 4:
    print("2")
if A + B == 5:
    print("1")

Submission status: Accepted

Solution code:
ans = '123'
ans = ans.replace(input(),'')
ans = ans.replace(input(),'')
print(ans)

Submission status: Accepted

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

out = 6 - A -B
print(out)

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
 
i = 1
while (i <= 3):
  if (i == A or i == B):
    i = i+1
  else:
    print(i)
    break

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
print(6-(a + b))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(A: int, B: int):
    l = [1,2,3]
    l.remove(A)
    l.remove(B)
    print(l[0])
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A =int(input())
B=int(input())
C=6-(A+B)
print(C)

Submission status: Accepted

Solution code:
def main():
    ans = [1, 2, 3]
    a = int(input())
    b = int(input())
    ans.remove(a)
    ans.remove(b)
    print(ans[0])
    

main()

Submission status: Accepted

Solution code:
ans = ['1', '2', '3']
ans.remove(input())
ans.remove(input())
print(ans[0])

Submission status: Accepted

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

if A+B == 3:
    ans = 3
elif A+B == 4:
    ans = 2
elif A+B == 5:
    ans = 1
print(ans)

Submission status: Accepted

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

ans = [1, 2, 3]

ans.remove(A)
ans.remove(B)

print(ans[0])

Submission status: Accepted

Solution code:
list_A= [1,2,3]
a = int(input())
b = int(input())
list_A.remove(a)
list_A.remove(b)
print(list_A[0])

Submission status: Accepted

Solution code:
a,b=[int(input()) for i in range(0,2)]
c=[1,2,3]
c.remove(a)
c.remove(b)
print((c[0]))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

c = [1, 2, 3]
c.remove(a)
c.remove(b)

print(c[0])

Submission status: Accepted

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

for i in "123":
    if i !=A and i !=B:
        print(i)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

l = [1,2,3]

del l[l.index(a)]
del l[l.index(b)]

print(l[0])

Submission status: Accepted

Solution code:
a=[-1,1,2,3]
n=int(input())
a[n]=-1
n=int(input())
a[n]=-1
print(max(a))

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())

if a==1 :
  if b==2:
    print(3)
  elif b==3:
    print(2)
elif a==2:
  if b==1:
    print(3)
  elif b==3:
    print(1)
elif a==3:
  if b==1:
    print(2)
  elif b==2:
    print(1)

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
import sys, heapq, bisect, math, itertools, string, queue, copy, time
from fractions import gcd
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7
EPS = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())


zenbu = {1,2,3}
A = int(input())
B = int(input())
bubun = {A,B}

kotae = zenbu - bubun

print(*kotae)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

if a == 1 and b==2:
    print('3')

elif a==1 and b==3:
    print('2')

elif a==2 and b==3:
    print('1')

elif a==2 and b==1:
    print('3')

elif a==3 and b==1:
    print('2')

elif a==3 and b==2:
    print('1')

Submission status: Accepted

Solution code:
A=int(input())
B = int(input())
C = A + B
list = {3: '3', 4: '2', 5: '1'}
print(list[C])

Submission status: Accepted

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

if A+B==3:
    print('3')
elif A+B==5:
    print('1')
elif A+B==4:
    print('2')

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
if a==1:
  if b==2:
    c=3
  elif b==3:
    c=2
elif a==2:
  if b==1:
    c=3
  elif b==3:
    c=1
elif a==3:
  if b==1:
    c=2
  elif b==2:
    c=1
print(c)

Submission status: Accepted

Solution code:
hoge = [0 for i in range(2)]

for i in range(2):
  hoge[i] = input()
  
A = int(hoge[0])
B = int(hoge[1])

ans = 6-(A+B)

print(ans)

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
if ((a==1)and(b==2))or((a==2)and(b==1)):
    print('3')
elif ((a==2)and(b==3))or((a==3)and(b==2)):
    print('1')
else:
    print('2')

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
if a + b == 3:
    print(3)
elif a + b == 4:
    print(2)
else:
    print(1)

Submission status: Accepted

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

ans = [1, 2, 3]
ans.remove(A)
ans.remove(B)
print(ans[0])

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
print(6//(a*b))

Submission status: Accepted

Solution code:
C = [int(input()) for i in range(2)]
if C[0] == 1:
  print(5-C[1])
elif C[0] == 2:
  print(4-C[1])
else:
  print(3-C[1])

Submission status: Accepted

Solution code:
import sys
import math

from collections import defaultdict
from collections import deque
def load(vtype=int):
    return vtype(input().strip())
def load_list(seplator=" ", vtype=int):
    return [vtype(v) for v in input().strip().split(seplator)]
def exit():
    import sys
    sys.exit(0)
def perm_sub(li, used):
    if len(li) == len(used):
        return [deque()]
    k = []
    for i in range(len(li)):
        if i in used:
            continue
        used.add(i)
        sub_list = perm_sub(li, used)
        for sub in sub_list:
            sub.appendleft(li[i])
        k.extend(sub_list)
        used.discard(i)
    return k
def perm_li(li):
    return perm_sub(li, set())
def perm_n(n):
    return perm_sub(list(range(n)), set())
def join_i(li, sep=""):
    return sep.join([str(e) for e in li])
def li2n(li):
    n, base = 0, 1
    for i in range(len(li)-1, -1, -1):
        n += li[i] * base
        base *= 10
    return n
def sli2ili(li):
    return [int(s) for s in li] 
def prime_list(n):
    li = [i for i in range(2, n+1)]
    for i in range(len(li)):
        if li[i] >= int(math.sqrt(n)):
            break
        if li[i] == -1:
            continue
        for j in range(i+1, len(li)):
            if li[j] % li[i] == 0:
                li[j] = -1
    return [n for n in li if n != -1]
def gcd(a, b):
    a, b = max(a, b), min(a, b)
    while True:
        r = a % b
        if r == 0: return b
        a, b = b, r
def lcm(a, b):
    return int(a * b / gcd(a,b))
def all_subset(li):
    s = []
    n = len(li)
    for bit in range(0, (1<<(n+1))):
        ss = set()
        for i in range(0, n):
            if (bit & (1 << i)):
                ss.add(li[i])
        s.append(ss)
    return s
a = load()
b = load()

print(6-a-b)

Submission status: Accepted

Solution code:
a = set(int(input()) for i in range(2))
[print(i) for i in ({1, 2, 3} - a)]

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

total = a + b
print(6-total)

Submission status: Accepted

Solution code:
a=input()
b=input()
x=[a,b]

if "1" not in x:
    print("1")
elif "2" not in x:
    print("2")
elif "3" not in x:
    print("3")

Submission status: Accepted

Solution code:
dic = {
  "13":2,
  "12":3,
  "23":1
}

print(dic["".join(sorted([input(), input()]))])

Submission status: Accepted

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

if A == 1:
    if B == 2:
        print(3)
    else:
        print(2)
elif A == 2:
    if B == 1:
        print(3)
    else:
        print(1)
elif A == 3:
    if B == 1:
        print(2)
    else:
        print(1)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
for i in range(1,4):
    if i !=a and i != b:
        print(i)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9 +7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#############
# Main Code #
#############

a = inputI()
b = inputI()

print(6-a-b)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())

total = a + b
print(6-total)

Submission status: Accepted

Solution code:
from sys import stdin
import math

a = int(stdin.readline().rstrip())
b = int(stdin.readline().rstrip())

print(6 - a - b)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

def solve():
  a = int(input())
  b = int(input())
  for i in range(1,4):
    if i != a and i != b:
      print(i)
  
solve()

Submission status: Accepted

Solution code:
a = [input() for i in range(2)]
if True != ("1" in a):
  print(1)
elif True != ("2" in a):
  print(2)
else:
  print(3)

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
ab=[1,2,3]
ab.remove(a)
ab.remove(b)
print(ab[0])