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: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
#from fractions import gcd
#A,B = map(int, input().split())
#print(A*B//gcd(A,B))
def gcd(a,b):
    if(a<b):
         b,a=a,b
    if(b==0):
        return a
    r = a%b
    if(r!=0) :
        a,b,r=b,r,b%r
        return gcd(b,r)
    else:
        return b

A,B = map(int, input().split())
print(A*B//gcd(A,B))

Submission status: Runtime Error

Solution code:
Q = 6-A-B;
print(Q);

Submission status: Runtime Error

Solution code:
Q = 6 - A -B
print(Q)

Submission status: Runtime Error

Solution code:
Q = 6-A-B
print Q

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
S, T = input().split()
Answer = []
 
for i in range(N):
  Answer.append(S[i])
  Answer.append(T[i])
  
print(''.join(Answer))

Submission status: Runtime Error

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

Answer = [1, 2, 3]

remove.Answer(A)
remove.Answer(B)

print(Answer[0])

Submission status: Runtime Error

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

for n in nums:
  if((a != n) and (b != n):
     print(n)

Submission status: Runtime Error

Solution code:
A,B=input().split()
a=int(A)
b=int(B)
 
c=min(a,b)
 
def sosu(x):
    sum=0
    for i in range(x):
        if x%(i+1)==0:
            sum+=1
    if sum==2:
        return True
    else:
        return False

j=2  
kobai=[]
while j<=c:
  if a%j==0 and b%j==0 and sosu(j):
    c=int(c/j)
    kobai.append(j)
    print(j)
    j=2
   
  else:
    j+=1
print(kobai) 
answer=a*b
for i in range(len(kobai)):
  answer=int(answer/kobai[i])

print(answer)

Submission status: Runtime Error

Solution code:
ans={1,2,3}

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

print(ans[0])

Submission status: Runtime Error

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

if A == 1　and B == 2:
  print(3)
elif A == 1 and B == 3:
  print(2)
elif A == 2 and B == 1:
  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)
else:
  print(0)

Submission status: Runtime Error

Solution code:
n=int(input())
m=int(input())
if (n==1 and m==2) or (n==2 and m==1):
  print('3')
elif (n==1 and m==3) or (n==3 and m==1):
  print('2')
elif (n=3and m==2) or (n==2 and m==3):
  print('1')

Submission status: Runtime Error

Solution code:
N = int(input()) 
a, b = map(str, input().split()) 
ans=''
for i in range(N):
    ans+= str(a[i])
    ans+= str(b[i])
print(ans)

Submission status: Runtime Error

Solution code:
s=input().split()
AN=["1","2","3"]
AN.remove(AN)
print(AN.pop(0))

Submission status: Runtime Error

Solution code:
s=input().split()
lAnsser=["1","2","3"]
lAnsser.remove(s)
print(lAnsser)

Submission status: Runtime Error

Solution code:
N=int(input())
if N%2 == 1:
    print(0)
else:
    d = 5
    count=0
    while N>1:
        n = N
        while n%d == 0:
            count+=1
            n/=d
    N-=2
print(count)

Submission status: Runtime Error

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

MON = 6
ANS =6-A-B
print(ANS)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x, y = input("Enter a two value: ").split() 
a = [1,2,3]
if 1 and 2 in a:
  print(3)
elif 1 and 3 in a:
  print(2)
elif 2 and 3 in a:
  print(3)

Submission status: Runtime Error

Solution code:
n = int(input())
base = 10

if n%2 != 0:
  print(0)
else:
  ans = 0
  for i in range(10000)
    ans += n//base
    base *= 5   
  print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int,input().split()))
 
s = 1
t = 0
 
for i in range(n):
    if s == a[i]:
        s += 1
    else:
        t += 1
if t == n:
    t = -1
print(t)

Submission status: Runtime Error

Solution code:
n = int(input())
 
a = list(map(int,input().split()))
 
s = 1
t = 0
 
for i in range(n):
   if s == a[i]:
      s += 1
   else:
      t +=1
      
if t != n:
  print(t)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
import math
 
a,b = map(int,input().split())
 
x = math.gcd(a,b)
 
print(a*b//x)

Submission status: Runtime Error

Solution code:
a,b=(int(x), for x in input().splite())
c=a+b
if c==3:
    print(3)
elif c==4:
    print(2)
else:
    print(1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np 

n,u,v=map(int, input().split())
S = []
for _ in range(n-1):
    S.append(list(map(int, input().split())))

pt= [[0]*0 for i in range(n)] 
for i in range(n-1):
    pt[S[i][0]-1].append(S[i][1])
    pt[S[i][1]-1].append(S[i][0])

def bfs(v):
    d=[-1]*n
    d[v-1]=0
    q=[v]
    c=1
    while q:
        q1=[]
        for i in q:
            for j in pt[i-1]:
                if d[j-1]==-1:
                    d[j-1]=c
                    q1.append(j)
        q=q1
        c+=1
        #print(d,q)
    return d
bfs_v=np.array(bfs(v))
bfs_u=np.array(bfs(u))
bfs_v_replace=bfs_v[bfs_v>bfs_u]
answer=np.max(bfs_v_replace)-1
print("{}".format(answer))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x,y = input().split()
x = int(x)
y = int(y)
if x < y:
  a = y
  b = x
else:
  a = x
  b = y
 
while b:
  a, b = b, a % b
 
print(int(x*y/a))

Submission status: Runtime Error

Solution code:
x,y = input().split()
x = int(x)
y = int(y)
if x < y:
  a = y
  b = x
else:
  a = x
  b = y
 
while b:
  a, b = b, a % b
 
print(x*y//a)

Submission status: Runtime Error

Solution code:
N = input()
S,T = input().split()
 
a = ""
for i in range(N):
  a+=S[i]+T[i]
print(a)

Submission status: Runtime Error

Solution code:
a = input()
b = input()
 
answer_list = {"1","2","3"}
answer_list.remove(a)
answer_list.remove(b)
 
print(answer_list[0])

Submission status: Runtime Error

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

answer_list = {"1","2","3"}
answer_list -= a
answer_list -= b

print(answer_list[0])

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
x=[1,2,3]

x.remove(A)
x.remove(B)
print(x[0])

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
x=[1,2,3]

x.remove(A)
x.remove(B)
print(x)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
for i=1,3
if not i==A and i==B:
  print(i)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for (int i = a; i < (int)b; i++)
#define all(v) v.begin(), v.end()
const int MOD = 1e9 + 7;
const int INF = 1e9;
//'A' = 65, 'Z' = 90, 'a' = 97, 'z' = 122

int main() {
    int a , b;
    cin >> a >> b;
    a--; b--;
    int x[3] = {};
    x[a]++;
    x[b]++;
    rep(i, 0, 3) if (!x[i]) cout << i + 1 << endl;
    return 0;
}

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=list(range(1,4))
C.pop(A)
C.pop(B)
print(C[0])

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, input().split()))
x = 1
t=0
for i in range(n):
    if a[i]==x:
        x+=1
        t+=1
 
if t==0:
    print(-1)
else:
    print(n-x+1)

Submission status: Runtime Error

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

pos, v = 1, 0

for i in range(N):
   if pos == a[i]:
      v += 1
      pos += 1

if v == 0:
   print(-1)
else:
   print(N - v + 1)

Submission status: Runtime Error

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

#print(N)
#print(a)

pos, v = 1, []

for i in range(N):
   if pos == a[i]:
      v.append(pos)
      pos += 1

if len(v) == 0:
   print(-1)
else:
   print(N - len(v))

Submission status: Runtime Error

Solution code:
str = list(map(int, input().split()))
a = str[0]
b = str[1]
i = 1
if a < b:
  big = b
  small = a
else:
  big = a
  small = b

while i != 0:
  i = big % small
  big = small
  small = i

print (int(a*b/big))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

def gcd( x, y ):
    while y != 0:
        x, y = y, x%y
    return x

def lcm(x, y):
    return (x * y) // gcd(x, y)

print(lcm(a, b))

Submission status: Runtime Error

Solution code:
a,b=map(int, input().split())
print(int(set(1,2,3)-set(a,b)))

Submission status: Runtime Error

Solution code:
print "He"

Submission status: Runtime Error

Solution code:
a = input()
b = input()
choices = '123'
for c in choises:
  if((c != a) and (c != b)):
    print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


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


def LF(): return list(map(float, input().split()))


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


def II(): return int(input())


def IF(): return float(input())


def LS(): return list(map(list, input().split()))


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


mod = 1000000007
inf = float('INF')

# solve


def solve():
    a = II()
    b = II()
    l = [0, 1, 2]
    l.remove(a)
    l.remove(b)
    print(l[0])
    return


# main
if __name__ == '__main__':
    solve()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input().split())
b = ont(input().split())
print(6 - a - b)

Submission status: Runtime Error

Solution code:
prirt(int(input())^int(input()))

Submission status: Runtime Error

Solution code:
prirt(int(input()^int(input()))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

pirnt(6-A-B)

Submission status: Runtime Error

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

print(6 - A - B)

Submission status: Runtime Error

Solution code:
q = [0,1,2]

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

q.remove(A)
q.remove(B)

print(q[0])

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;
#define int long long

signed main(void){
    int a,b; cin >> a >> b;
    for (int i=1;i<=3;i++){
        if(i!=a && i !=b){
            cout << i << endl;
            return 0;
        }
    }
    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if A,B=1,2:
  print("3")
if A,B=2,3:
  print("1")
if A,B=1,3:
  print("2")

Submission status: Runtime Error

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


def main():
    A, B = [int(_) for _ in input().split()]

    product = A * B
    for divisor in range(min([A, B]) // 2, 2, -1):
        if A % divisor == 0 and B % divisor == 0:
            A = A // divisor
            B = B // divisor
            product = product // divisor

    print(product)


def correct_1():
    A, B = [int(_) for _ in input().split()]

    for i in range(1, B + 1):
        if A * i % B == 0:
            print(A * i)
            break


def correct_2():
    A, B = [int(_) for _ in input().split()]

    def gcd(a, b):
        while b != 0:
            a, b = b, a % b
        return a

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

    print(lcm(A, B))


if __name__ == "__main__":
    correct_1()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=[1,2,3];s.pop(int(input());s.pop(int(input());print(s[0])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#include<string>
#include<iostream>
#include<vector>
#include<cstdlib>
#include<stdio.h>
#include<cmath>
#include<limits>
#include<iomanip>

using namespace std;

template <class T> using V = vector<T>;

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

const long long INF = 1LL << 60;

using ll = long long;
using db = long double;
using st = string;
using ch = char;
using bl = bool;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
using vbl = V<bl>;
using graph = V<V<int>>;
using pq = priority_queue<ll>;



#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define rFOR(i,a,b) for(ll i=(a);i>=(b);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define co(a) cout<<a<<endl;
#define pb(a) push_back(a);



ll Sum(ll n) {
ll m=0;
  while(n){
    m+=n%10;
    n/=10;
  }
  return m;
}



const int MAX = 510000;
const int MOD = 1000000007;
 
long long fac[MAX], finv[MAX], inv[MAX];
 
void Comuse() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}


#define comuse Comuse()

ll combi(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

ll perm(int n,int k){
    if(n < k) return 0;
    if(n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] % MOD) % MOD;
}


ll lcm(ll a,ll b){
  ll n;
  n=a/gcd(a,b)*b;
  return n;
}


vll div(ll n){
  vll ret;
  for(ll i=1;i*i<=n;i++){
    if(n%i==0){
      ret.push_back(i);
      if(i*i!=n){
        ret.push_back(n/i);
      }
    }
  }
  SORT(ret);
  return (ret);
}

ll modpow(ll a,ll n,ll mod){
  ll ans=1;
  while(n>0){
    if(n&1){
      ans=ans*a%mod;
    }

    a=a*a%mod;
    
    n>>=1;
  }

  return ans;
}

void Solve();


const int MAX_N = 131072;
//segment tree 
int NN;
int seg[MAX_N*2-1];
void seguse(){
  for(int i=0;i<2*NN-1;i++){
    seg[i]=INT_MAX;
  }
}

signed main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout<<setprecision(20)<<fixed;
  Solve();
}


/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/
//segtreeの葉の先頭の添え字はn-1
void Solve(){
  //vll segtree(524287);
  //ll N=262144;
  ll a,b;
    cin>>a>>b;
  cout<<6-a-b<<endl;
}

Submission status: Runtime Error

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

for i in [1,2,3]:
  if j not in [a,b]:
    print(j)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(100000000)
n,u,v=map(int,input().split())
visitedlist=[-1 for  i in range(n)]
kilist=[[] for i in range(n)]
anslist=[0 for i in range(n)]
searchedlist=[-1 for i in range(n)]
for i in range(n-1):
        a,b=map(int,input().split())
        kilist[a-1].append(b)
        kilist[b-1].append(a)
def search(P):
        searchedlist[P-1]=1
        visitedlist[P-1]=1
        flag=0
        for j in kilist[P-1]:
            if visitedlist[j-1]<0:
                visitedlist[j-1]=1
                flag+=1
                anslist[j-1]=anslist[P-1]+1
        else:
            pass

        if flag>0:    
            for k in kilist[P-1]:
                if searchedlist[k-1]==-1:
                    search(k)
search(v)
if v<u:
	print(anslist[u]-1)
else:
  if u>1:
  	print(v-u)
  else:
    print(v-2)

Submission status: Runtime Error

Solution code:
n,m = map(int,input().split())
print(6-n-m)

Submission status: Runtime Error

Solution code:
a, b = [int(x) for x in input().split()]
print(str(6 - a+b))

Submission status: Runtime Error

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

problem = set(1,2,3)

print(problem - set(a,b))

Submission status: Runtime Error

Solution code:
N=int(input())
A,B=map(str,input().split())
S=[]
for i in range(N)
    S.append(A[i])
    S.append(B[i])
print(S)

Submission status: Runtime Error

Solution code:
n=int(input())
A,B = input().split()
i=0
i=int(i)
list01=[]
for d in range(n): 
  lisa=A[i]+B[i]
  list01.append(lisa)
  i+=1
for s in list01:
print(s)

Submission status: Runtime Error

Solution code:
import math
N = int(input())

if N%2 == 1:
    ans = 0
else:

    df = math.log10(N)
    d = math.floor(df)
    cnt = 0
    for i in range(d,0,-1):
        cnt += (N//10**i) * (10**i-1)//(10-1)
        N//=10**i

print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input().split()
A = int(S[0])
B = int(S[1])
C = 0



for i in range(1,1000000000,1):
  if A > B:
  	C = A * i
  else:
    C = B *i
    
  if C % B == 0:
    print(C)
    break

Submission status: Runtime Error

Solution code:
N,u,v = map(int,input().split())
AB = [list(map(int,input().split())) for _ in range(N-1)]
    
x = [[] for _ in range(N)]
for ab in AB:
  a = ab[0]
  b = ab[1]
  x[a-1].append(b-1)
  x[b-1].append(a-1)
  
flag1 = [False]*N
flag2 = [False]*N
length1 = [0]*N
length2 = [0]*N
go = [v-1]
while go!=[]:
  a = go.pop()
  if flag1[a]:
    continue
  else:
    flag1[a]=True
    for i in x[a]:
      if flag1[i]:
        continue
      else:
        length1[i]=length1[a]+1
        go.append(i)

go = [u-1]
while go!=[]:
  a = go.pop()
  if flag2[a]:
    continue
  else:
    flag2[a]=True
    for i in x[a]:
      if flag2[i]:
        continue
      else:
        length2[i]=length2[a]+1
        go.append(i)
        
print(max(length1))

Submission status: Runtime Error

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

ans={1,2,3}
ans.remove(a)
ans.remove(b)

if ans == {a}
    print("a")
if ans == {b}
    print("b")
if ans == {c}
    print("c")

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
for i in range(3)
	if((i+1==a or i+1==b)=False):
    	print(i+1)

Submission status: Runtime Error

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

ans={1,2,3}
ans.remove(a)
ans.remove(b)
print(ans)

Submission status: Runtime Error

Solution code:
a, b = map(int,input().split())
def gcd(a,b):
    x = max(a,b)
    y = min(a,b)
    while x // y != 0:
        z = x // y
        y = z
        return z
print(int(a * b / gcd(a,b)))

Submission status: Runtime Error

Solution code:
S = []
for _ in range(2):
    S.append(input())

if S == [1, 2]
  print('3')
elif S == [1, 3]:
  print('2')
elif S == [2, 3]:
  print('1')

Submission status: Runtime Error

Solution code:
n = int(input())
a_list = list(map(int,input().split()))

#min_indexlist = [a_list.index(min(a_list))]

min_indexlist = []

m = min(a_list)

#print(m)

#ここがおかしい
"""
for i in range(len(a_list)):
    if( a_list[i] == m+1):
        m = a_list[i]
        min_indexlist.append(i)
"""


f = False

for i in range(len(a_list)):

    if(f==False):
        if(a_list[i] == 1):
            min_indexlist.append(i)
            f = True

    if(f==True):
        if( a_list[i] == m+1):
            m = a_list[i]
            min_indexlist.append(i)
            
if(len(min_indexlist)==0):
    min_indexlist.append(1)



#print(min_indexlist)

#砕いたレンガの後のリスト
crash_list = []
for i in range(len(min_indexlist)):
    crash_list.append(a_list[min_indexlist[i]])

#print(crash_list)

#砕いたレンガの数
crash = n - len(min_indexlist)


frag=True

for i in range(len(crash_list)):
    if(crash_list[i] != i+1):
        frag = False


if(frag == True):
    print(crash)
elif(frag == False):
    print(-1)

Submission status: Runtime Error

Solution code:
n = int(input())
a_list = list(map(int,input().split()))

min_indexlist = []

m = min(a_list)


f = False

for i in range(len(a_list)):

    if(f==False):
        if(a_list[i] == 1):
            min_indexlist.append(i)
            f = True

    if(f==True):
        if( a_list[i] == m+1):
            m = a_list[i]
            min_indexlist.append(i)
            
if(len(min_indexlist)==0):
    min_indexlist.append(1)


#砕いたレンガの後のリスト
crash_list = []
for i in range(len(min_indexlist)):
    crash_list.append(a_list[min_indexlist[i]])

#print(crash_list)

#砕いたレンガの数
crash = n - len(min_indexlist)


frag=True

for i in range(len(crash_list)):
    if(crash_list[i] != i+1):
        frag = False


if(frag == True):
    print(crash)
elif(frag == False):
    print(-1)

Submission status: Runtime Error

Solution code:
S = []
for _ in range(2):
    S.append(input())

if S == [1, 2]
  print('3')
elif S == [2, 1]:
  print('3')
elif S == [1, 3]:
  print('2')
elif S == [3, 1]:
  print('2')
elif S == [2, 3]:
  print('1')
elif S == [3, 2]:
  print('1')

Submission status: Runtime Error

Solution code:
a=input().split()
A=int(a[0])
B=int(a[1])
li=[2]
li2=[]
p=0
if B>A:
    c=A
    A=B
    B=A

for i in range(3,int(A**0.5)+1):
    for j in range(2,i+1):
        if j==i:
            li.append(i)
        if i%j==0:
            break
while p==0:
    for s in li:
        if A%s==0 and B%s==0:
            A/=s
            B/=s
            li2.append(s)
            break
        if A%s==0 and B%s!=0:
            A/=s
            li2.append(s)
            break
        if A%s!=0 and B%s==0:
            B/=s
            li2.append(s)
            break
        if s==li[-1]:
            p=1
n=1
for m in li2:
    n*=m
print(n)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
if A=1 B=2:
  "print(3)"

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

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

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

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

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

Submission status: Runtime Error

Solution code:
import sys
def fastio():
    from io import StringIO
    from atexit import register
    global input
    sys.stdin = StringIO(sys.stdin.read())
    input = lambda : sys.stdin.readline().rstrip('\r\n')
    sys.stdout = StringIO()
    register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(*var):
    print(*var, file=sys.stderr)

INF = 10**20
MOD = 10**9 + 7
I = lambda:list(map(int,input().split()))
# from math import gcd
# from collections import defaultdict as dd, Counter
# from bisect import bisect_left as bl, bisect_right as br

n, = I()
a = I()
pos = [0]*n
for i in range(n):
    pos[a[i]-1] = i
ans = 1
for i in range(1, n):
    if pos[i] > pos[i-1]:
        ans += 1
    else:
        break
if 1 in a:
    print(ans)
else:
    print(-1)

Submission status: Runtime Error

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


def main():
    A, B = [int(_) for _ in input().split()]

    product = A * B
    for divisor in range(min([A, B]) // 2, 1, -1):
        if A % divisor == 0 and B % divisor == 0:
            A = A // divisor
            B = B // divisor
            product = product // divisor

    print(product)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
a=input()
b=input()
x=[0 for _ in range(3)]
x[a-1]=1
x[b-1]=1
for i in range(3):
  if x[i]==0:
    print(i+1)
    break

Submission status: Runtime Error

Solution code:
number_of_guests = input().split()

A = int(number_of_guests[0])
B = int(number_of_guests[1])


A_divisors = []
x = 2
while True:
    if (A % x == 0):
        A /= x
        A_divisors.append(x)
    else:
        x += 1

    if (A <= 1):
        break

y = 2
B_divisors = []
while True:
    if (B % y == 0):
        B /= y
        B_divisors.append(y)
    else:
        y += 1

    if (B <= 1):
        break

A_only = [x for x in A_divisors if (x not in B_divisors)]
B_only = [y for y in B_divisors if (y not in A_divisors)]

common_divisors = []
for z in (A_divisors + B_divisors):
    if z in A_divisors and z in B_divisors:
        if (A_divisors.count(z) >= B_divisors.count(z)):
            common_divisors.append(z**A_divisors.count(z))
        else:
            common_divisors.append(z**B_divisors.count(z))

        A_divisors = list(filter(lambda x: x != z, A_divisors))
        B_divisors = list(filter(lambda x: x != z, B_divisors))


result = 1
for x in A_only + B_only + common_divisors:
    result *= x

print(result)

Submission status: Runtime Error

Solution code:
import sys
def fastio():
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(var):
	print(var, file=sys.stderr)

INF = 10**20
MOD = 10**9 + 7
I = lambda:list(map(int,input().split()))
from math import gcd
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br

a = []
a.append(I()[0])
a.append(I()[0])
for i in range(1, 4):
	if i not in a:
		print(i)
		break

Submission status: Runtime Error

Solution code:
import numpy as np

n = int(input())
a_list = np.array(list(map(int, input().split())))
n_index = np.arange(1, n+1)

breaks = 0
if min(a_list) > 1:
    print(-1)
else:
    for n in n_index:
        if len(a_list) > 0:
            if n in a_list:
                i = a_list.index(n)
                a_list = a_list[i+1:]
                breaks += i
                print(a_list)
            else:
                breaks += len(a_list)
                print(breaks)
                exit()
    print(breaks)

Submission status: Runtime Error

Solution code:
N, u, v = map(int, input().split())
u -= 1
v -= 1

e_list = [[] for _ in range(N)]

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

def calc_depth_table(v):
	queue = [[v, None, 0]]
	depth_table = [0] * N
	depth_table[v] = 0
	
	while queue:
		cur, pre, depth = queue.pop()
		depth += 1
		for n in e_list[cur]:
			if n != pre:
				queue.append([n, cur, depth])
				depth_table[n] = depth
	return depth_table

def calc_depth_table2(depth_from_v, u):
	queue = [[u, None, 0, depth_from_v[u], u]]
	depth_table = [0] * N
	depth_table[u] = (0, depth_from_v[u], u)
	
	while queue:
		cur, pre, depth, min_depth_from_v, min_depth_point = queue.pop()
		depth += 1
		for n in e_list[cur]:
			if n != pre:
				depth2 = depth_from_v[n]
				if min_depth_from_v > depth2:
					new_min_depth = depth2
					new_min_depth_point = n
				else:
					new_min_depth = min_depth_from_v
					new_min_depth_point = min_depth_point
				queue.append([n, cur, depth, new_min_depth, new_min_depth_point])
				depth_table[n] = (depth, new_min_depth, new_min_depth_point)
	return depth_table

depth_from_v = calc_depth_table(v)
depth_from_u = calc_depth_table2(depth_from_v, u)

#print(depth_from_v)
#print(depth_from_u)

max_count = 0
for i in range(N):
	a_dist = depth_from_v[i]
	t_dist, a_hit_dist, hit_pos = depth_from_u[i]
	t_hit_dist = depth_from_u[hit_pos][0]
	
#	print(t_hit_dist, a_hit_dist)
	if t_hit_dist < a_hit_dist:
#		print(t_hit_dist, a_hit_dist)
#		if (a_hit_dist - t_hit_dist) % 2 == 1:
		if max_count < a_dist - 1:
			max_count = a_dist - 1
#			else:
#				

print(max_count)

Submission status: Runtime Error

Solution code:
N = int(input())
S,T = map(str,input().split())
A = ""
for i in S:
  A+=i
  for j in T:
    A+=j
print(A)

Submission status: Runtime Error

Solution code:
import math

A,B=map(int,(input().split()))    
ABgcd=math.gcd(A,B)
answer=A*B//ABgcd
print(answer)

Submission status: Runtime Error

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

print(c[0])

Submission status: Runtime Error

Solution code:
s=input().split()
i=int(s[0])
j=int(s[1])
amari=[]
a=""
if i<j:
  p_1=j
  p_2=i
elif i==j:
  a=str(i)
elif i>j:
  p_1=i
  p_2=j
while a=="":
  am=p_1%p_2
  if am==0:
    break
  amari.append(am)
  p_1=p_2
  p_2=am
a=str(amari[-1])
print(a)

Submission status: Runtime Error

Solution code:
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
A,B=map(int,(input().split()))    
print(lcm(A, B))

Submission status: Runtime Error

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

print(int(a * b / fractions.gcd(a, b)))

Submission status: Runtime Error

Solution code:
N = int(input())
S,T = input().split()
a =""

for i in range(N):
  a += S[i] + T[i]
  
print(a)

Submission status: Runtime Error

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

a　= int(input())
b　= int(input())

c.remove(a)
c.remove(b)

c[0]

Submission status: Runtime Error

Solution code:
a1=input()
a2=input()
print(6-a1-a2)

Submission status: Runtime Error

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

a, b = map(int, input().split())

c.remove(a)
c.remove(b)

c[0]

Submission status: Runtime Error

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

def gcd(A,B):
  while B!=0:
    A,B=B,A%B
  return A
def lcm(A,B):
  return A*B//gcd(A,B)
print(lcm(A,B))