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:
import sys
import math
import re
import io

def main():
    a = int(input())
    b = int(input())
    (a, b) = (min(a,b), max(a,b))
    if a == 1 and b ==  2:
        print(3)
    elif a == 1 and b ==  3:
        print(2)
    else:
        print(1)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
answers = ["1", "2", "3"]
answers.remove(input().strip())
answers.remove(input().strip())
print(answers[0])

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)
elif A!=3 and B!=3:
        print(3)

Submission status: Accepted

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

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)
else:
  if b == 1:
    print(2)
  else:
    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 = int(input())
B = int(input())
a, b = sorted((A, B))
if (a, b) == (1, 2):
    print(3)
elif (a, b) == (1, 3):
    print(2)
elif (a, b) == (2, 3):
    print(1)

Submission status: Accepted

Solution code:
import math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def gcd(a,b): #最大公約数
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def divisors(a): # 約数列挙
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): #素数判定
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): #素数列挙
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def main():
    a = int(input())
    b = int(input())
    for i in range(1,4):
        if i==a:
            continue
        elif i==b:
            continue
        else:
            print(i)
    return

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
lst = [A,B]
for i in range(1,4):
    if not i in lst:
        print(i)
        exit()

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 = int(input())
B = int(input())
for i in range(3):
    if A == i+1 or B == i+1:
        continue
    else:
        print(i+1)

Submission status: Accepted

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

for i in range(1, 4):
    if i != A and i != B:
        ans = i
print(ans)

Submission status: Accepted

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

for i in range(1, 4):
    if i == A:
        continue
    if i == B:
        continue
    print(i)

Submission status: Accepted

Solution code:
x = int(input())
y = int(input())

r = [1,2,3]
r = [i for i in r if i != x and i != y]

print(r[0])

Submission status: Accepted

Solution code:
ans = 6
for _ in range(2):
  ans -= int(input())
print(ans)

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)
        exit()

Submission status: Accepted

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

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

print(*num)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
AB={a,b}
if 1 in AB:
  if 2 in AB:
    print(3)
  else:
    print(2)
else:
  print(1)

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
li = [1,2,3]

for i in li:
  if i not in [A, B]:
    print(i)
    exit()

Submission status: Accepted

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

Submission status: Accepted

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

ans = 6

print(ans - 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:
ab = [int(input()) for _ in range(2)]
for i in range(1,4):
  if not i in ab:
    print(i)

Submission status: Accepted

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

targ = (A, B)
for i in range(3):
    if (i + 1) not in targ: print(i + 1)

Submission status: Accepted

Solution code:
A=int(input())
B=int(input())
x=[1]*3
x[A-1]=x[B-1]=0
print(x.index(1)+1)

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().rstrip()  # ignore trailing spaces

li = [1, 2, 3]
a = ni()
b = ni()
li.remove(a)
li.remove(b)
print(li[0])

Submission status: Accepted

Solution code:
B = int(input())
C = int(input())
l = []
l.append(B)
l.append(C)

for i in range(1, 4):
    if i not in l:
        ans = i
        break
print(ans)

Submission status: Accepted

Solution code:
def roundone(s):
    ans = [1, 1, 1]
    for i in s:
        ans[i - 1] = 0
    for a in range(len(ans)):
        if ans[a]:
            print(a + 1)

if __name__ == "__main__":
    import sys
    in_str = []
    for line in sys.stdin:
        in_str.append(int(line))
    roundone(in_str)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(list(S)[0])

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:
import sys
input = sys.stdin.readline

total = 6
A = int(input())
B = int(input())
#a, b, c, d = (int(i) for i in input().split())  
#a = [int(i) for i in input().split()] 
#e = [[int(i) for i in input().split()] for i in range(n)] 

print(total -A - B)

Submission status: Accepted

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

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())
for i in range(1,4,1):
    if i!=a and i!=b:
        print(i)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a=int(input())
b=int(input())
ans=[1,2,3]
ans.remove(a)
ans.remove(b)
print(ans[0])

Submission status: Accepted

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


def main():
    A = int(input())
    B = int(input())
    if 1 != A and 1 != B:
        print(1)
    if 2 != A and 2 != B:
        print(2)
    if 3 != A and 3 != B:
        print(3)



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
ans = [1,2,3]
ans[A-1] = 0
ans[B-1] = 0
print(max(ans))

Submission status: Accepted

Solution code:
A,B = [int(input()) for i in range(2)]
print(6//A//B)

Submission status: Accepted

Solution code:
from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(a, b):
    return 1 + 2 + 3 - a - b
    #if a + b + c <= 21: return 'win'
    #else: return 'bust'



do_submit = True
#do_submit = False

def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    k = int(parsed_lines[0][1])
    S = parsed_lines[1][0]
    return n, k, S


if not do_submit:
    a, b, c = input_parse("""
    3 1
    ABC
    """)
    print(sol(a, b, c))

    a, b, c = input_parse("""
    4 3
    CABA
    """)
    print(sol(a, b, c))

else:
    #a, b, c = list(map(int, input().split()))
    # S = input().split()
    a = int(input())
    b = int(input())
    # T = input()
    print(sol(a, b))
    # S = input().strip()
    # print(sol(S))

Submission status: Accepted

Solution code:
li=[]
li.append(int(input()))
li.append(int(input()))
for i in range(1,4):
    if i not in li:
        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)

Submission status: Accepted

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

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

Submission status: Accepted

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

lis = [1, 2, 3]
lis.remove(a)
lis.remove(b)
print(lis[0])

Submission status: Accepted

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

s = {1,2,3}
s -= {A}
s -= {B}

print(list(s)[0])

Submission status: Accepted

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

C = 6 - (A +B)

print C

Submission status: Accepted

Solution code:
def main():
    a=int(input())
    b=int(input())
    if a>b: a,b=b,a
    if a==1 and b==2: print(3)
    elif a==1 and b==3: print(2)
    else: print(1)


if __name__ == '__main__':
    main()

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 main():

    a=int(input())
    b=int(input())
    print(6-a-b)
if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!python3

def resolve():
    A = int(input().rstrip())
    B = int(input().rstrip())


    print(6 - A - B)

if __name__ == "__main__":
    resolve()

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())

sum = 6

ans = sum - A - B
print(ans)

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())

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())
for i in range(3):
    if i+1 != a and i+1 != b:
        print(i+1)

Submission status: Accepted

Solution code:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

import math
import statistics
import numpy as np
import queue

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

Submission status: Accepted

Solution code:
wrong = input() + input()
for i in range(1, 4):
    if str(i) not in wrong:
        print(i)

Submission status: Accepted

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

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

print(res[0])

Submission status: Accepted

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

a = int(input().split()[0])
b = int(input().split()[0])
ans = set([1, 2, 3]) - set([a, b])
ans = list(ans)[0]

print(ans)

Submission status: Accepted

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

if a+b == 3:
    ans = 3
elif a+b == 4:
    ans = 2
else:
    ans = 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#N, K = map(int, input().split())
#x = list(map(int, input().split()))
A = int(input())
B = int(input())

C = [A, B]

if 2 not in C:
    print(2)
if 1 not in C:
    print(1)
if 3 not in C:
    print(3)

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())

st = set([A, B])

p = set([1,2,3])

ans = p - st
print(list(ans)[0])

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:
import sys
import itertools
input = sys.stdin.readline


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


def read_list():
    return list(read_values())


def read_lists(N):
    return [read_list() for n in range(N)]


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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    a = int(input())
    b = int(input())
    list =[1,2,3]
    list.remove(a)
    list.remove(b)
    print(list[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
s = list(sorted([a, b]))

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

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:
ans = [1,2,3]
A,B = int(input()), int(input())
del ans[ans.index(A)]
del ans[ans.index(B)]
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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


print(6 - A -B )

Submission status: Accepted

Solution code:
x = {1: True, 2: True, 3: True}
a = int(input())
b = int(input())

del x[a]
del x[b]

print(list(x.keys())[0])

Submission status: Accepted

Solution code:
A = int(input().strip())
B = int(input().strip())
not_ans = [A,B]
for i in range(1,4):
    if not i in not_ans:
        print (i)
        break

Submission status: Accepted

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


def main():
    xs = {1, 2, 3}
    xs.discard(int(input()))
    xs.discard(int(input()))
    print(xs.pop())


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
print(1+2+3 -A-B)

Submission status: Accepted

Solution code:
ans = {1, 2, 3}
for i in range(2):
    num = int(input())
    ans.discard(num)

res = ans.pop()
print(res)

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
A={a,b}
for i in range(1,4):
  if i not in A:
    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:
n=int(input())
m=int(input())
nm=n+m
if nm==3:
    print(3)
elif nm==4:
    print(2)
else:
    print(1)

Submission status: Accepted

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

c = [a,b]

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

Submission status: Accepted

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

ans = [1, 2, 3]
wrong = [A, B]

for i in ans:
    if i not in wrong:
        print(i)

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:
a = []
a.append(int(input()))
a.append(int(input()))

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

Submission status: Accepted

Solution code:
num1 = int(input())
num2 = int(input())
sum = 6-num1-num2
print(sum)

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:
import sys,collections,math,random;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

lis = []
for i in range(2):
    lis.append(I())
print(6-sum(lis))

Submission status: Accepted

Solution code:
import sys

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

def main():
    ans = 6 - a - b
    return ans

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n_list = [int(input()) for i in range(2)]

print(6-n_list[0]-n_list[1])

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
A, B = map(int, read().split())

for i in [1, 2, 3]:
    if i != A and i != B:
        print(i)
        exit()

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
temp = [1,2,3]

for num in temp:
  if num == a or num == b:
    continue
  print(num)

Submission status: Accepted

Solution code:
# coding:utf-8

A = int(input())
B = int(input())

print(6-A-B)

Submission status: Accepted

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

ans.remove(int(input()))
ans.remove(int(input()))

print(ans[0])
exit(0)

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())

L = [0, 0, 0]
L[A-1] += 1
L[B-1] += 1
for i in range(3):
    if L[i] == 0:
        print(i+1)
        break

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(1+2+3-A-B)

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:
#設定
import sys
input = sys.stdin.buffer.readline

#ライブラリインポート
from collections import defaultdict

#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	A = int(input())
	B = int(input())
	D = defaultdict(int)
	D[A] += 1
	D[B] += 1
	if D[1] == 0:
		print(1)
	elif D[2] == 0:
		print(2)
	else:
		print(3)
	


if __name__ == '__main__':
	main()

Submission status: Accepted

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

ans = {1, 2, 3}

ans.remove(A)
ans.remove(B)
print(ans.pop())

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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())
c = [1, 2, 3]
c.remove(a)
c.remove(b)
print(*c)

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
l=[a,b]
l.sort()
if l[0]==2:
    print(1)
elif l[1]==2:
    print(3)
else:
    print(2)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
s = [a, b]
ans = [1, 2, 3]

for a in ans:
  if not a in s:
    print(a)

Submission status: Accepted

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

def main():
    a = int(input())
    b = int(input())
    print(6-a-b)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for x in range(1, 4):
    if A == x or B == x:
        continue
    else:
        print(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
print('1' if a!=1 and b!=1 else '2' if a!=2 and b!=2 else '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:
ans = [1, 2, 3]
a = int(input())
b = int(input())
for x in ans:
	if x != a and x != b:
		print(x)
		break

Submission status: Accepted

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

Submission status: Accepted

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

list = [A, B]

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

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
ans = list(set([1,2,3]) - set([a,b]))
print(ans[0])

Submission status: Accepted

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

Submission status: Accepted

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

li = [1,2,3]
for i in li:
  if i != A and i != B:
    print(i)

Submission status: Accepted

Solution code:
A = input()
B = 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())
l  = [a,b]
for i in range(1,4):
    if not i in l:
        print(i)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
m = int(input())
print(6-n-m)

Submission status: Accepted

Solution code:
# coding: utf-8
a = int(input())
b = int(input())
l = [1,2,3]
l.pop(l.index(a))
l.pop(l.index(b))
print(l[0])

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
ans = [1, 2, 3]
for num in ans:
    if num != a and num != b:
        print(num)
        exit(0)

Submission status: Accepted

Solution code:
def main():
    nums = [1,2,3]
    a = int(input())
    b = int(input())
    for i in nums:
        if i != a and i != b:
            print(i)
            return
    

main()

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
a = [A,B]
if not 1 in a:
  print(1)
elif not 2 in a:
  print(2)
else:
  print(3)

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    A =INT()
    B =INT()
    c=[1,2,3]
    c.remove(A)
    c.remove(B)
    print(c[0])
if __name__ == '__main__':
    do()

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:
import sys

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]

a = ri()
b = ri()
s = set([1, 2, 3]) - set([a, b])
print(list(s)[0])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    A = int(input())
    B = int(input())
    ans = {1, 2, 3}
    for a in ans:
        if a == A or a == B:
            continue
        print(a)


if __name__ == '__main__':
    main()

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)
        break

Submission status: Accepted

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

print(int(6 / a / b))

Submission status: Accepted

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

Submission status: Accepted

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

print(C)

Submission status: Accepted

Solution code:
print(*(set('123') - {input(), input()}))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
import numpy as np
A = int(input())
B = int(input())
C = [1, 2, 3]
for i in C:
    if i != A and i != B:
        print(i)

Submission status: Accepted

Solution code:
# coding: utf-8

import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def MI() : return map(int, input().split())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def chkprint(*args) : names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}; print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

A = I()
B = I()

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:
A = int(input())
B = int(input())
for i in range(1,4):
    if i!=A and i!=B:
        print(i)
        break

Submission status: Accepted

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

ans = 6 - (A + B)

print(ans)

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
arr=[1,2,3]
for x in arr:
	if x!=a and x!=b:
		print(x)
		break

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
def inpl():
    return list(map(int, input().split()))


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

Submission status: Accepted

Solution code:
import copy
import heapq
import math

def j(n):
    if n:print("Yes")
    else:print("No")
    exit(0)
rem = 10 ** 9 + 7

"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def ipmultiplerow(n):
    a = []
    for i in range(n):
        a.append(ip())
    return a
def printrow(a):
    for i in a:
        print(i)

a = ip()
b = ip()
if a*b == 2:
    print(3)
if a*b == 6:
    print(1)
if a*b == 3:
    print(2)

Submission status: Accepted

Solution code:
N = int(input())
M = int(input())
print(6-N-M)

Submission status: Accepted

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

print(6-a-b)

Submission status: Accepted

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

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

print(array[0])

Submission status: Accepted

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

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)
    break

Submission status: Accepted

Solution code:
ans = [1, 2, 3]
A = int(input())
B = int(input())
ans.remove(A)
ans.remove(B)
print(ans[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 = 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())
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())
A = [1,2,3]
A.remove(a)
A.remove(b)
print(*A)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    A=list(range(1,4))
    A.remove(int(input()))
    A.remove(int(input()))
    print(A[0])
resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int, open(0).read().split())

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

Submission status: Accepted

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

ans.remove(a)
ans.remove(b)
print(ans[0])

Submission status: Accepted

Solution code:
import queue
import math
import copy
"""
N = int(input())
#S = input()
# (N,M) = (int(i) for i in input().split(" "))
# A = [int(i) for i in input().split()]
A = []
for i in range(N):
	A.append(int(input()))

print(A)

"""

N = int(input())
M = int(input())
print(6-N-M)

Submission status: Accepted

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

print(min([i for i in range(1, 4) if i not in [A, B]]))

Submission status: Accepted

Solution code:
import sys, math
def input():
    return sys.stdin.readline()[:-1]
from itertools import permutations, combinations
from collections import defaultdict

sys.setrecursionlimit(10**7)
A = int(input())
B = int(input())

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

Submission status: Accepted

Solution code:
def main():
    n = input()
    b = input()
    for i in range(1, 4):
        if i not in [n, b]:
            print i


main()

Submission status: Accepted

Solution code:
a={int(input()),int(input())}
s={1,2,3}
print((s-a).pop())

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
ab = {a, b}
for i in [1,2,3]:
  if not i in ab:
    print(i)

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)