Problem:


Score : 100 points

Problem Statement

In AtCoder City, there are three stations numbered 1, 2, and 3.

Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is A, Company A operates Station i; if S_i is B, Company B operates Station i.

To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.

Determine if there is a pair of stations that will be connected by a bus service.

Constraints

Each character of S is A or B.

|S| = 3

Input

Input is given from Standard Input in the following format:

S

Output

If there is a pair of stations that will be connected by a bus service, print Yes; otherwise, print No.

Sample Input 1

ABA

Sample Output 1

Yes

Company A operates Station 1 and 3, while Company B operates Station 2.

There will be a bus service between Station 1 and 2, and between Station 2 and 3, so print Yes.

Sample Input 2

BBA

Sample Output 2

Yes

Company B operates Station 1 and 2, while Company A operates Station 3.

There will be a bus service between Station 1 and 3, and between Station 2 and 3, so print Yes.

Sample Input 3

BBB

Sample Output 3

No

Company B operates all the stations. Thus, there will be no bus service, so print No.



Sample input:
ABA


Sample output:
Yes

Submission status: Runtime Error

Solution code:
S = input()
a = count("A")
if a == 3:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
import math

TAXRATE8 = 0.08
TAXRATE10 = 0.1

tax8, tax10 = map(int, input().split())

amount8_min = math.ceil(tax8 / TAXRATE8)
amount8_max = math.floor((tax8+1) / TAXRATE8)
if ((tax8+1) / TAXRATE8).is_integer():
  amount8_max -= 1


amount10_min = math.ceil(tax10 / TAXRATE10)
amount10_max = math.floor((tax10+1) / TAXRATE10)
if ((tax10+1) / TAXRATE10).is_integer():
  amount10_max -= 1

ans_set = set(range(amount8_min, amount8_max)) & set(range(amount10_min, amount10_max))

if ans_set == set({}):
  print(-1)
else:
  print(min(ans_set))

Submission status: Runtime Error

Solution code:
import numpy as np

grid = []
#for i in range(1):
array = list(map(int,input().strip().split()))
#    grid.append(array)
#print(array)
a = array[0]
b = array[1]

min8 = a/0.08
max8 = (a+1)/0.08
min10 = b/0.1
max10 = (b+1)/0.1

def lists(a,b):
    if a%1==0:
        a2 = a
    else:
        a2 = int(a)+1
    if b%1==0:
        b2 = b-1
    else:
        b2 = int(b)
    return np.arange(a2,b2+1)

list8 = lists(min8,max8)
list10 = lists(min10,max10)
#print(list8,list10)
hosii = list(set(list8)&set(list10))
if len(hosii)>0:
    print(int(np.min(hosii)))
else:
    print(-1)

Submission status: Runtime Error

Solution code:
n,a,b=map(int,input().split())
t=0
r=0
for _ in range(10^100):
    if n <= t:
        print(r)
        break
    elif n >= a+t:
        t+=a+b
        r+=a
    else:
        r+=min(n-t,a)
        t+=a+b

Submission status: Runtime Error

Solution code:
sta = input()

s1 = sta[0]
s2 = sta[1]
s3 = sta[2]

if :
    pass
if s1 == s2 and s2 == s3:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
ans=-1
nums=input().split(" ")
t8,t10=int(nums[0]),int(nums[1])
value=max(round(t8*100/8),round(t10*100/10))+1
for i in range(value):
  v=value-i
  tax8=v*8/100
  tax10=v*10/100
  if tax8>=t8 and tax8<t8+1 and tax10>=t10 and tax10<t10+1:
    ans=v
  elif tax8<t8 or tax10<t10:
    break
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np
a = list(map(int,input().split()))
b = a[0]/0.08
c = (a[0]+1)/0.08
d = a[1]/0.1
e = (a[1]+1)/0.1
f=20000
if b<d:
    min=b
else :
    min =d
g=int(np.ceil(min))
for i in range(g,10001):
    if i>=b and i<=c:
        if i>=d and i<=e:
            f = i
            break
if f==20000:
    print(-1)
else:
    print(f)

Submission status: Runtime Error

Solution code:
import sys
S = input()
Q = int(input())
pin = 0
for i in range(Q):
  t = list(sys.stdin.readline().split())
  if int(t[0]) == 1:
    if pin == 1:
      pin = 0
    else:
      pin = 1
  else:
    if int(t[1]) % 2 == pin :
      S = S + t[2]
    else:
      S = t[2] + S
if pin == 1:
  S = S[::-1]
print(S)

Submission status: Runtime Error

Solution code:
ans=-1
nums=input().split(" ")
t8,t10=int(nums[0]),int(nums[1])
value_f=int(max(round(t8*100/8),round(t10*100/10))+1)
while True:
  tax8,tax10=value_f*8/100,value_f*10/100
  if tax8>=t8 and tax8<t8+1 and tax10>=t10 and tax10<t10+1:
    ans=value_f
  elif tax8<t8 or tax10<t10:
    print(ans)
    break
  value_f-=1
  if value_f<0:
    break

Submission status: Runtime Error

Solution code:
S = input()
s = int(0)
s += ord(S[:0])
s += ord(S[:1])
s += ord(S[:2])
if ( s % 41 or s % 42):
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
n, a, b = map(int, input().split())
q = n // (a + b)
mod = n % (a + b)
if mod <= a:
  print(a * q + mod)
else:
  print(a * q)

Submission status: Runtime Error

Solution code:
S = input()
cnt = 0
for i in len(S):
  if S[i] == 'A':
    cnt = cnt +1

if cnt == 3 or cnt == 0:
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
bus = input()

if not 'A' in bus:
  print( 'Yes' )
if not 'B' in bus:
  print( 'Yes' )
else
  print( 'No' )

Submission status: Runtime Error

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

N=int(li[0])
A=int(li[1])
B=int(li[2])

def firstcheck():
    sum=A+B
    count=A
    if(A>=N or A+B>=N):
        return A

    while True:
        if(i%2==0):
            sum+=A
            if(sum>=N):
                count+=(A-(sum-N))
                return count
            else:
                count+=A
                continue
        else:
            sum+=B
            if(sum>=N):
                return count


res=firstcheck()
print(res)

Submission status: Runtime Error

Solution code:
S = str(input())
Q = int(input())

qs = [input().split() for i in range(Q)]

for q in qs:
    if q[0] == '1':
        S = S[::-1]
    else:
        if q[1] == '1':
            S = q[2] + S
        else:
            S = S + q[2]

print(S)

Submission status: Runtime Error

Solution code:
import math
a, b = map(int, input().split())
a_min = a / 0.08
a_max = (a + 1) / 0.08
b_min = b / 0.1
b_max = (b + 1) / 0.1
if a_min > b_min:
  min = a_min
else:
  min = b_min
if a_max < b_max:
  max = a_max
else:
  max = b_max
min = math.ceil(min)
if math.floor(max) == max:
  max = max - 1 
else:
  max = math.floor(max)
if min <= max:
  print(min)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
if S[0] != S[1] and S[0] != S[2]:
    print("Yes")
elif S[0] != S[1] and S[1] != S[2]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import math
ans=-1
nums=input().split(" ")
t8,t10=int(nums[0]),int(nums[1])
value_f=max(round(t8*100/8),round(t10*100/10))+1
while value_f>=0:
	tax8,tax10=value_f*8/100,value_f*10/100
	if tax8>=t8 and tax8<t8+1 and tax10>=t10 and tax10<t10+1:
		ans=value_f
	elif tax8<t8 or tax10<t10:
		print(ans)
		break
	value_f-=1

Submission status: Runtime Error

Solution code:
nums = list(map(int, input().split()))
n = nums[0]
a = nums[1]
b = nums[2]

if a == 0:
    print(0)
elif b == 0:
    print(n)
else:
   print(n / (a+b) * a)

Submission status: Runtime Error

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

if A == 0 :
    print(0)

elif N >A+B :
    q, mod = divmod(N, A+B)
    if mod <= A :
        print(q*A+mod)
    if mod > A :
        print(q*A+A)
    
elif N == A+B :
    q, mod = divmod(N, A+B)
    print(q*A)

elif N < A+B :
    print(N)

Submission status: Runtime Error

Solution code:
s = input()
Q = int(input())
flag = True  # flagがTrueのとき、偶数回数の反転が行われている
cnt = 0
for _ in range(Q):
    query = list(map(str, input().split()))
    # tmp.append(query)
    if len(query) == 1:  # 1のqueryのとき
        cnt += 1
        if flag:
            flag = False
        else:
            flag = True
    else:
        f, c = query[1], query[2]
        if f == "1":  # 先頭に追加するもの
            if flag:
                s = c + s  # 偶数回の反転なら素直に先頭に追加する
            else:
                s += c  # 奇数会の反転なら後ろに追加する
        else:  # 末尾に追加する
            if flag:
                s += c
            else:
                s = c + s

if cnt % 2 == 1 and cnt != 0:
    s = s[::-1]
print(s)

Submission status: Runtime Error

Solution code:
import sys

S = input()

Q = int(input())
flag=0

for i in range(Q):
    r = sys.stdin.readline().strip('\n')
    if r == '1':
        S = S[::-1]
    else:
        ni, f, c = r.split()
        if f=='1':
            S = c + S
        else:
            S+=c

print(S)

Submission status: Runtime Error

Solution code:

def main():
    n, a, b = map(int, input().split())
    
    ball = [0]*n
    count = 0
    flag = True
    if a == 0 :
        print(0)
        exit(0)

    while flag:
        while flag:
            ball[count]="b"
            count += 1
            if count == n:
                flag = False
            if count % a == 0:
                break
    
        while flag:
            ball[count]="r"
            count += 1
            if count == n:
                flag = False
            if count % (a + b) == 0:
                break
            
     

    print(ball.count("b"))


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
    s = input()
    print("no" if s == "AAA" or s == "BBB" else "yes")

Submission status: Runtime Error

Solution code:
l = list(map(int, input().split()))
n,a,b=l[0],l[1],l[2]
count=0
while True:
  for i in range(a):
    if n == 0:
      break
    count += 1
    n -= 1	
  for i in range(b):
    if n == 0:
      break
    n -= 1
  if n == 0:
    break
print(count)

Submission status: Runtime Error

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

q, mod = divmod(N, A+B)


if A == 0 :
    print(0)

elif N >A+B :
    if mod <= A :
        print(q*A+mod)
    if mod > A :
        print(q*A+A)
    
elif N == A+B :
    print(q*A)

elif N < A+B :
    print(N)

Submission status: Runtime Error

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

ans = (N//(A+B))*A
tmp = N - (N//(A+B))*(A+B)
if(tmp <= A): ans += tmp
else: ans += tmp
print(ans)

Submission status: Runtime Error

Solution code:
N,A,B = map(int,input().split())
qaws = ""
c = 0
while(N > len(qaws)):
  qaws = qaws + "B"*A
  qaws = qaws + "R"*B
  c += 1
print(qaws[:N].count("B"))

Submission status: Runtime Error

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

q, mod = divmod(N, A+B)


if A == 0 :
    print(0)

elif N >A+B :
    if mod <= A :
        print(q*A+mod)
    if mod > A :
        print(q*A+A)
    
elif N == A+B :
    print(q*A)

elif N < A or N < A+B :
    print(N)

Submission status: Runtime Error

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

ss = nn()
a = 'No' if ss[0] == ss[1] and ss[1] == ss[2] else 'Yes'
print(a)

Submission status: Runtime Error

Solution code:
a,b = [int(x) for x in input().split()]
amax = int((a+1)*12.5)
amin = int(a*12.5)
bmax = int((b+1)*10)
bmin = int(b*10)
hantei = bmin
if amax < bmin:
  hantei = str(-1)
elif bmax < amin:
  hantei = str(-1)
elif bmin < amin:
  hantei = amin
print(hantei)

Submission status: Runtime Error

Solution code:
import sys
 
N, A, B = map(int,input().split())
 
ans = 0
 
if N < A:
  print(N)
  sys.exit()
 
if N < A+B:
  print(A)
  sys.exit()

if N%(A+B) <A:
  print((A*(N//(A+B))) + (N%(A+B)))
else:
  print((A*(N//(A+B))) + A)

Submission status: Runtime Error

Solution code:
S = input()
s = int(0)
s += ord(S[:0])
s += ord(S[:1])
s += ord(S[:2])
if ( s % 41 or s % 42):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
S = input()
s = int(0)
s += ord(S[:0])
s += ord(S[:1])
s += ord(S[:2])
if ( s % 123 or s % 126):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

q, mod = divmod(N, A+B)


if A == 0 :
    print(0)

elif N >A+B :
    if mod <= A :
        print(q*A+mod)
    if mod > A :
        print(q*A+A)
    
elif N == A+B :
    print(q*A)

elif N < A+B :
    print(N)
    
elif N < A :
    print(N)

Submission status: Runtime Error

Solution code:
import math
ans=-1
nums=input().split(" ")
t8,t10=int(nums[0]),int(nums[1])
value_f=max(math.ceil(t8*100/8),math.ceil(t10*10))
while value_f>=0:
	tax8,tax10=math.floor(value_f*0.08),math.floor(value_f*0.1)
	if tax8==t8 and tax10==t10:
		ans=value_f
	elif tax8<t8 or tax10<t10:
		print(ans)
		break
	value_f-=1

Submission status: Runtime Error

Solution code:
n=input()
if(n=="AAA" || n=="BBB"):
	print("NO")
else:
	print("YES")

Submission status: Runtime Error

Solution code:
S = list(input())
s = int(0)
for i in range(S):
  s += ord(i)
if ( s % 123 or s % 126):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
S = input()
s = int(0)
for i in range(S):
  s += ord(i)
if ( s == 123 or s == 126):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
S = input()
s = int(0)
for i in range(S):
  s += ord(i)
if ( s % 123 or s % 126):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

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

a = int(A*100/8)
b = int(B*100/10)

x = int(a*0.10)
y = int(b*0.08)

if x == B and y == A:
    if a < b:
        print(a)
    else:
        print(b)
elif x == B:
    print(a)
elif y == A:
    print(b)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
from math import ceil, floor
 
a, b = [int(c) for c in input().split(" ")]
A = ceil(a / 0.08)
B = ceil(b/ 0.1)
 
if (A < B):
  if (floor(B * 0.08) == a):
    print(B)
  else:
    print(-1)
elif (B < A):
  if (floor(A*0.1) == b):
    print(A)
  else:
    print(-1)
else:
  print(-1);

Submission status: Runtime Error

Solution code:
s = input()
q = int(input())
for _ in range(q):
  t = input()
  if t[0]=='1':
    s = s[::-1]
  else:
    if t[2]=='1':
      s = t[4:] + s
    else:
      s = s + t[4:]
print(s)

Submission status: Runtime Error

Solution code:
S = input()
s = int(0)
for i in range(S):
  s += ord(i)
if ( s % 41 or s % 42):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
s=input()
q=int(input())
for _ in range(q):
	k=input()
	if k[0] == "1":
		s = s[::-1]
	else:
		if k[2] == "1":
			s = k[4:]+s
		else:
			s = s+k[4:]
print(s)

Submission status: Runtime Error

Solution code:
S=input()
if S[1]!= S[2] and S[1]!=S[3]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
from math import ceil, floor

a, b = [int(c) for c in input()]
A = ceil(a / 0.08)
B = ceil(b/ 0.1)
 
if (A < B):
  if (floor(B * 0.08) == a):
    print(B)
  else:
    print(-1)
elif (B < A):
  if (floor(A*0.1) == b):
    print(A)
  else:
    print(-1)
else:
  print(-1);

Submission status: Runtime Error

Solution code:
import math
A,B=map(int,input().split())
sup=min((A+1)/0.08,(B+1)/0.1)
inf=max(A/0.08,B/0.1)
inf2=math.ceil(inf)
if inf2<sup:
  print(inf2)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
import math
n , a , b  = map(int, input().split())
if b == 0: exit(print(n))
if a >= n : exit(print(n))
if a == 0: exit(print(0))
ans = n//(a+b)
#print("ans",ans)
print(ans*a+(n-ans*a-ans*b))

Submission status: Runtime Error

Solution code:
if S[1]!= S[2] and S[1]!=S[3]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
# coding: utf-8

s=str(input())

if s=="AAA" or s="BBB":
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
import math
n , a , b  = map(int, input().split())
if a >= n : exit(print(n))
if a == 0: exit(print(0))
ans = n//(a+b)
#print("ans",ans)
print(ans*a+(n-ans*a-ans*b))

Submission status: Runtime Error

Solution code:
import math
ans=-1
nums=input().split(" ")
t8,t10=int(nums[0]),int(nums[1])
value=t8*100/8
value_f=math.ceil(value*1.2)
while True:
	tax8,tax10=math.floor(value_f*0.08),math.floor(value_f*0.1)
	if tax8== t8 and tax10==t10:
		ans=value_f
		value_f-=1
	elif tax8<t8 or tax10<t10:
		print(ans)
		break
	else:
		value_f-=1
	if value_f==0:
		print(ans)
		break

Submission status: Runtime Error

Solution code:
import math
n , a , b  = map(int, input().split())
if a >= n : exit(print(n))
ans = n//(a+b)
#print("ans",ans)
print(ans*a+(n-ans*a-ans*b))

Submission status: Runtime Error

Solution code:
from sys import stdin
#T = int(stdin.readline())
S = stdin.readline()

if S == 'AAA' or S == 'BBB':
    print("No")
else
    print("Yes")

Submission status: Runtime Error

Solution code:
s=str(input())
q=int(input())
now = 0
mae,usiro="",""
for _ in range(q):
  lis = list(map(str,input().split()))
  if int(lis[0]) == 1:
    now = (now+1)%2
  else:
    if (int(lis[1])+now)%2 == 1:
      mae = lis[2]+mae
    else:
      usiro= usiro +lis[2]
s = mae+s+usiro
if now ==0:
  print(s)
else:
  print(s[::-1])

Submission status: Runtime Error

Solution code:
from sys import stdin
#T = int(stdin.readline())
S = stdin.readline()

if S == 'AAA' or S == 'BBB':
    return False
else
    return True

Submission status: Runtime Error

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

def check(X):
  global A
  global B
  return (int)(X*0.08) == A and (int)(X*0.1) == B
 
for x in range(1, B*11):
  if check(x):
    print(x)
    exit(0)
 
print(-1)

Submission status: Runtime Error

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

sum = b + c

#何セットあるか確かめる
set = int(a / sum)
#print(set)

#セットの中にある青玉の個数
blue_1 = set * b 
#print(blue_1)

#最後のあまりを数える
amari = a % sum
#print(amari)

if amari <= b:
  print(blue_1 + amari)
  
else :
  print(blue_1 + b)

Submission status: Runtime Error

Solution code:

N, A,B = map(int, input().split())
str = []
for j in range(N//(A+B)+1):
    for i in range(A):
        if i==N+1:
            break
        str.append('b')

    for i in range(B):
        if i==N+1:
            break
        str.append('r')
print(str)
count = 0
for k in range(N):
    if str[k] == 'b':
        count+=1
print(count)

Submission status: Runtime Error

Solution code:
str = input()
str_list = list(str)
 
if str_list[0] =! str_list[1]:
  print("Yes")
elif str_list[1] =! str_list[2]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
list = str(input())

if list is "AAA" or list is "BBB" or len(list(list)) is not 3:
    print("No")
else : 
    print("Yes")

Submission status: Runtime Error

Solution code:
str = input()
str_list = list(str)
 
if str_list[0] =! str_list[1]:
  print("Yes")
elif str_list[1] == str_list[1]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n, a, b = list(map(int, input().split(' ')))
tmp = 0
count = 0
if a == 0:
    print(0)
while count < 10**100:
    n -= a
    tmp += a
    if n <= 0:
        print(tmp + n)
        break
    n -= b
    if n <= 0:
        print(tmp)
        break

Submission status: Runtime Error

Solution code:
if len(set(S)) != 2:
  print("NO")
else:
  print("YES")

Submission status: Runtime Error

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

s = int(n / (a + b))

if n % (a + b) == 0:
  print(a * s)
else:
  rem = n % (a + b)
  if rem <= a:
    ans = a * s + rem
  else:
    ans = a * s + a
  print(ans)

Submission status: Runtime Error

Solution code:
S = input()
if len(S) == 3 and S.count('A')==2 or S.count('B')==2:
  print('Yes')
  else:
    print('No')

Submission status: Runtime Error

Solution code:
import math
n , a , b  = map(int, input().split())
if a >= n : exit(print(n))
ans = n/(a+b)
print(math.floor(ans*a))

Submission status: Runtime Error

Solution code:
S = input()
if S = 'AAA' or S = 'BBB':
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
S = input()
if S = 'AAA' and S = 'BBB':
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
s = input()
q = int(input())
add_head = ""
add_tail = ""

for _ in range(q):
    query = input().split()
    if query[0] == "1":
        add_head, add_tail = add_tail,add_head
    else:
        if query[1] == "1":
            add_head = query[2] + add_head
        else:
            add_tail = add_tail + query[2]
                
print(add_head[::-1] + s + add_tail)

Submission status: Runtime Error

Solution code:
code = input()
return len(set(list(code))) != 1;

Submission status: Runtime Error

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

if a == 0:
    print(0)
elif b == 0:
    print(n)
else:
    blue = (n // (a + b)) * a
    amari = n % (a+b)
    if amari > a:
        blue += a
    else:
        blue += amari

    print(blue)

Submission status: Runtime Error

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

x = 0
i = 0

for i in range(3) :
  if word[i] != word[i+1] : x = x + 1
    
if x == 0 : print("No")

else : print("Yes")

Submission status: Runtime Error

Solution code:
S = input()
if S = "AAA" or S = "BBB":
  print("NO")
else:
  print("YES")

Submission status: Runtime Error

Solution code:
S = int(input())
if S == 'AAA' or S == 'BBB':
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

Solution code:
s = input()
s_list = list(str)
 
if str_list[0] == str_list[2]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a,b,c=input().split()
if a==b and a==c:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
li = list(map(int,input().split()))
a = 0
b = 0
out = 0
isA = True
for i in range(li[0]):
    if(isA):
        a += 1
        out += 1
        if(a >= li[1]):
            isA = False
            a = 0
    else:
        b += 1
        if(b >= li[2]):
            isA = True
            b = 0
print(out)

Submission status: Runtime Error

Solution code:
s=list(str(input()))
q=int(input())
now = 0
for _ in range(q):
  lis = list(map(str,input().split()))
  if int(lis[0]) == 1:
    now = (now+1)%2
  else:
    if (int(lis[1])+now)%2 == 1:
      s.insert(0,lis[2])
    else:
      s.append(lis[2])
if now ==0:
  for i in range(len(s)):
    print(s[i],end="")
else:
  for i in range(len(s)):
    print(s[-i-1],end="")

Submission status: Runtime Error

Solution code:
N,b,r = map(int, input().split())
 
num = int(N / (b+r))
rest = N - num * (b + r)

if rest >= b:
	print(num * b + b)
else:
	print(num * b + rest)

Submission status: Runtime Error

Solution code:
a,b,c=input().split()
if a==b and a==c:
  print(No)
else:
  print(Yes)

Submission status: Runtime Error

Solution code:
    s = input()
    n = s.count()
    if(n <= 1):
        print("No")
    else:
        print("Yes")

Submission status: Runtime Error

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

num = int(N / (b+r))
rest = N - num * (b + r)
if rest >= b:
	print(num * b + b)
else:
	print(num * b + rest)

Submission status: Runtime Error

Solution code:
input_line = input()

if input_line == "AAA" or input_line == "BBB"
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
S = int(input())
if N == AAA or N == BBB:
  print(No)
else:
  print(Yes)

Submission status: Runtime Error

Solution code:
def yesno(S):
  if S==AAA or S==BBB:
    return No
  else:
    return Yes
  
print(yesno(S))

Submission status: Runtime Error

Solution code:
if S == AAA or BBB:
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

Solution code:
n, b, r = map(int, input().split())
count = 0
i = 0
while (n>i):
    for bi in range(b):
        count += 1
        i += 1
        if n <= i:
            break
    for ri in range(r):
        i += 1
        if n<=i:
            break
print(count)

Submission status: Runtime Error

Solution code:
# To add a new cell, type '# %%'
# To add a new markdown cell, type '# %% [markdown]'

# %%
one = lst[0][0]
two = lst[0][1]
three = lst[0][2]


# %%
one_two = one == two
two_three = two == three
three_one = three == one




# %%
if any([one_two, two_three, three_one]):
    print('Yes')
else:
    print('No')


# %%

Submission status: Runtime Error

Solution code:
if S[0] == S[1] and S[1] == S[2]:
  print("NO")
else:
  print("YES")

Submission status: Runtime Error

Solution code:
a=input()
len=len(a)
a_cnt=0
b_cnt=0
for i in range(len):
    if a[i]='A':
        a_cnt+=1
    else :
        b_cnt+=1
if a_cnt>0 and b_cnt>0:
    print('Yes')
else :
    print('No')

Submission status: Runtime Error

Solution code:
# To add a new cell, type '# %%'
# To add a new markdown cell, type '# %% [markdown]'

# %%
one = lst[0][0]
two = lst[0][1]
three = lst[0][2]


# %%
one_two = one == two
two_three = two == three
three_one = three == one


# %%
any([one_two, two_three, three_one])


# %%
if any([one_two, two_three, three_one]):
    print('Yes')
else:
    print('No')


# %%

Submission status: Runtime Error

Solution code:
S = input()
if S = 'AAA' and S = 'BBB':
  print('No')
else:
  print('No')

Submission status: Runtime Error

Solution code:

import argparse

def main(s: str):
    if s[0] == s[1] == s[2]:
        return "No"
    else:
        return "Yes"

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("s", type=str)
    args = parser.parse_args()
    print(main(args.s))

Submission status: Runtime Error

Solution code:
s = input()
if s == 'AAA':
  print 'No'
elif s == 'BBB':
  print 'No'
else:
  print 'Yes'

Submission status: Runtime Error

Solution code:
s1,s2,s3 = input().split()

if s1 == s2 and s1 == s3:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
S = input()

if S == 'AAA' or S = 'BBB':
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:

if S == "AAA" or S == "BBB":
    print("NO")
else:
    print("YES")

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
s = input()
s1 = int(s[0])
s2 = int(s[1])
s3 = int(s[2])

if s1==s2:
	if s1==s3:
		print("No")
	else:
		print("Yes")
else:
	print("Yes")

Submission status: Runtime Error

Solution code:
i=input()
j=i[0]
k=0

for n in range(2):
  if i[n+1]!=j:
	print('Yes')
	k=1
  
if k=0:
  print('No')

Submission status: Runtime Error

Solution code:
str = input()
str_list = list(str)

if str_list[0] == str_ list[2]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
 s= input()
n = s.count()
if(n == 1):
    print("No")
else
    print("Yes")

Submission status: Runtime Error

Solution code:
S  = [int(input()) for i in range(3)]
print (S)

Submission status: Runtime Error

Solution code:
s = input()

    a = False
    for i in range(len(s)):
        if s[i] == "A":
            a = True
            break

    b = False
    for i in range(len(s)):
        if s[i] == "B":
            b = True
            break

    print(a and b)

Submission status: Runtime Error

Solution code:
S=input()
if S= AAA or BBB
print(No)
 else print(YES)

Submission status: Runtime Error

Solution code:
s = map(str, input())

if a and b in s:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
def main():
    S =list(map(int,input().split()))
    if S[0] == S[1] and S[0] == S[2]:
        print("No")
    else :
        print("Yes")


main()

Submission status: Runtime Error

Solution code:
s = input()
n = s.count()
if(n < 2):
    print("Yes")
else
    print("No")

Submission status: Runtime Error

Solution code:
def main():
    S =list(map(int,input().split()))
    if S[0] == S[1] and S[0] == S[2]
        print("No")
    else 
        print("Yes")


main()

Submission status: Runtime Error

Solution code:
S = set(input())
def i():
  if S = [AAA]
  print('No')
  elif S = [BBB]
  print('No')
  else:
    print('Yes')
  return

def i()

Submission status: Runtime Error

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

x = 0

if word[1] != word[2] :
  x = x+1
  
if word[2] != word[3] :
  x = x+1
  
if word[3] != word[1] :
  x = x+1
  
if x == 0 : print("No")
  
else : print("Yes")

Submission status: Runtime Error

Solution code:
S = input()
if S="AAA" or S="BBB":
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
print("Yes" if "A" in input() and "B" in input() else "No"

Submission status: Runtime Error

Solution code:
s = input()
ans = 'Yes'

if s == "AAA" or a == "BBB":
  ans = "No"

print(ans)

Submission status: Runtime Error

Solution code:
S = input()

if S == AAA or BBB:
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

Solution code:
N,A,B = map(int,input().split())
C = N//(A+B)
D = N%(A+B)
print(C*A+min(D,A))

Submission status: Runtime Error

Solution code:
print("YES" if "A" in input() and "B" in input() else "NO")

Submission status: Runtime Error

Solution code:
S = input()

if S = 'AAA' or S = 'BBB':
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

Solution code:
s = input()
if s == AAA or BBB:
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
s=input()
print("Yes" if lens(set(s))==1 else "No")

Submission status: Runtime Error

Solution code:
value = input()
if value == "AAA" or "BBB":
  print("No")
 else:
  print("Yes")

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,a,b) for (ll i = (a); i < (b); i++)
#define REP(i,n) rep(i,0,n)

void solve() 
{
    string s;cin>>s;
    if(s[0]==s[1]&&s[1]==s[2])cout<<"No"<<endl;
    else cout<<"Yes"<<endl;
}

int main()
{
    cin.tie(0);
	ios::sync_with_stdio(false);
    solve();
    return 0;
}

Submission status: Runtime Error

Solution code:
if S[0] == S[1] == S[2]:
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
s = str(input())
if s == "AAA" or s == "BBB":
    input("No")
else:
    input("Yes")

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,a,b) for (ll i = (a); i < (b); i++)
#define REP(i,n) rep(i,0,n)

void solve() 
{
    string s;cin>>s
    if(s[0]==s[1]&&s[1]==s[2])cout<<"No"<<endl;
    else cout<<"Yes"<<endl;
}

int main()
{
    cin.tie(0);
	ios::sync_with_stdio(false);
    solve();
    return 0;
}

Submission status: Runtime Error

Solution code:
ef S(): return input().rstrip()

def main():
    s = S()

    if 'A' in s and 'B' in s:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
s=input()
if s==="AAA" or "BBB":
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,a,b) for (ll i = (a); i < (b); i++)
#define REP(i,n) rep(i,0,n)

void solve() 
{
    char a,b,c;cin>>a>>b>>c;
    if(a==b&&b==c)cout<<"No"<<endl;
    else cout<<"Yes"<<endl;
}

int main()
{
    cin.tie(0);
	ios::sync_with_stdio(false);
    solve();
    return 0;
}

Submission status: Runtime Error

Solution code:
a = input().split()
if a[0] == a[1] == a[2]:
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input()
if a = "AAA" or a = "BBB":
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
n = input()
if n == "aaa" or  == "bbb":
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
s = input()

if s=="AAA" or s=="BBB":
  print "No"
else:
  print "Yes"