Problem:


Score : 100 points

Problem Statement

A balance scale tips to the left if L>R, where L is the total weight of the masses on the left pan and R is the total weight of the masses on the right pan. Similarly, it balances if L=R, and tips to the right if L<R.

Takahashi placed a mass of weight A and a mass of weight B on the left pan of a balance scale, and placed a mass of weight C and a mass of weight D on the right pan.

Print Left if the balance scale tips to the left; print Balanced if it balances; print Right if it tips to the right.

Constraints

1\leq A,B,C,D \leq 10

All input values are integers.

Input

Input is given from Standard Input in the following format:

A B C D

Output

Print Left if the balance scale tips to the left; print Balanced if it balances; print Right if it tips to the right.

Sample Input 1

3 8 7 1

Sample Output 1

Left

The total weight of the masses on the left pan is 11, and the total weight of the masses on the right pan is 8. Since 11>8, we should print Left.

Sample Input 2

3 4 5 2

Sample Output 2

Balanced

The total weight of the masses on the left pan is 7, and the total weight of the masses on the right pan is 7. Since 7=7, we should print Balanced.

Sample Input 3

1 7 6 4

Sample Output 3

Right

The total weight of the masses on the left pan is 8, and the total weight of the masses on the right pan is 10. Since 8<10, we should print Right.



Sample input:
3 8 7 1


Sample output:
Left

Submission status: Wrong Answer

Solution code:
a,b,c,d = list(map(int, input().split()))
if(a + b == c+d):
  print("Balance")
elif(a + b > c+d):
  print("Left")
else:
  print("Right")

Submission status: Wrong Answer

Solution code:
a,b,c,d = list(map(int, input().split()))
if(a + b == c+d):
  print("Balance")
  exit()
if(a + b > c+d):
  print("Left")
  exit()
if(a + b < c+d):
  print("Right")
  exit()

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split())
if a+b > c+d:
	print('Left')
elif a+b==c+d:
	print('Balance')
else:
	print('Right')

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
if a[0]+a[1]<a[2]+a[3]:
  print("Right")
else:
  print("Left")

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split())
l=a+b
r=c+d
if l>r:
  print('Left')
elif l==r:
  print('balanced')
else:
  print('Right')

Submission status: Wrong Answer

Solution code:
A,B,C,D = map(int, input().split())
A = A+B
D = C+D
if A == C:
  print('Balanced')
elif A < C:
  print('Right')
else:
  print('Left')

Submission status: Wrong Answer

Solution code:
a, b, c, d = map(int, input().split())
if a + b == c + d:
    print("Balance")
elif a + b < c + d:
    print("Right")
else:
    print("Left")

Submission status: Wrong Answer

Solution code:
a,b,c,d = map(int,input().split())
if a+b<c+d:
  print("Right")
elif a+b>c+d:
  print("Light")
else:
  print("Balanced")

Submission status: Wrong Answer

Solution code:
aa = list(map(int,input().split()))
bb = ["Left","Right","Balanced"]
a,b,c,d = [i for i in aa]
print(a,b,c,d)

if a + b > c +d:
    print(bb[0] )
if a + b < c +d:
    print(bb[1] )
if a + b == c +d:
    print(bb[2] )

Submission status: Wrong Answer

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
input=sys.stdin.readline
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [input() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    S = ST()
    ans = len(S)
    for i in range(1, len(S)):
        if S[i] != S[i - 1]:
            ans = min(ans, max(i, len(S) - i ))
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
input=sys.stdin.readline
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [input() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    S = ST()
    print(S)
    ans = len(S)
    for i in range(1, len(S)):
        if S[i] != S[i - 1]:
            ans = min(ans, max(i, len(S) - i ))
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# sys.stdin.readline()
import sys
input = sys.stdin.readline

a, b, c, d = map(int, input().split())
if a+b > c+d:
    ans = 'Left'
elif a+b == c+b:
    ans = 'Balanced'
else:
    ans = 'Right'
print(ans)

Submission status: Wrong Answer

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a, b,c,d = map(int, input().split())
if a+b<c+d:
    print("Left")
elif a+b==c+d:
    print("Balanced")
else:
    print("Right")

Submission status: Wrong Answer

Solution code:
#天秤
  
a,b,c,d=map(int,input().split())

l=a+b
r=c+d

if l==r:
	print("Balanved")
else:
	if l>r:
		print("Left")
	else:
		print("Right")

Submission status: Wrong Answer

Solution code:
n, a, b = [20, 7, 20]
res = 0
 
for i in range(1,n+1):
  sum = 0
  j=0
  while True:
    num = (i//(10**j))
    if num!=0:
      num = num%10
      sum += num
      j+=1
    else:
      break
  if a<=sum and sum<=b:
    res += sum;
 
print(res)

Submission status: Wrong Answer

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

m=a+b
n=c+d

if m>n:
  print("left")
elif m==n:
  print("balanced")
else:
  print("left")

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split())
print(["Left" if a+b>c+d else "Right","Balanced"][a+b!=c+d])

Submission status: Wrong Answer

Solution code:
a,s,d,f=map(int,input().split())
if a+s>d+f:
  print("Left")
elif a+s==d+f:
  print("Blanced")
else:
  print("Right")

Submission status: Wrong Answer

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

if A + B < C + D:
    print('Left')
elif A + B == C + D:
    print('Balanced')
else:
    print('Right')

Submission status: Wrong Answer

Solution code:
a,b,c,d = list(map(int, input().split()))
print("Left" if a+b > c+d else "Right" if a+b > c+d else "Balanced")

Submission status: Wrong Answer

Solution code:
import functools

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


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


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


def inls():
    return input().split()


def inpm(line):
    return [inp() for _ in range(line)]


def inpfm(line):
    return [inpf() for _ in range(line)]


def inpsm(line):
    return [inps() for _ in range(line)]


def inlm(line):
    return [inl() for _ in range(line)]


def inlfm(line):
    return [inlf() for _ in range(line)]


def inlsm(line):
    return [inls() for _ in range(line)]


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper

a, b, c, d =inl()
if a + b > b+d:
    print('Left')
elif a + b < b+d:
    print('Right')
else:print('Balanced')

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split())
if a+b > c+d:
  print("Left")
if a+b==c+d:
  print("Balanced")
else:
  print("Right")

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split())
if a+b>c+d:
  print("Left")
if a+b==c+d:
  print("Balanced")
else:
  print("Right")

Submission status: Wrong Answer

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

if (A+B) > (C+D):
  print("Left")
elif (A+B) > (C+D):
  print("Right")
else:
  print("Balanced")

Submission status: Wrong Answer

Solution code:
a,b,c,d = map(int,input().split())
if a+b>c+d:
    print("Left")
elif a+b==c+d:
    print("Balanced")
else:
    print("RIght")

Submission status: Wrong Answer

Solution code:
A, B, C, D = map(int, input().split())
L, R = A+B, C+D
print(["Balanced", "Left", "Right"][R<L + -(R>L)])

Submission status: Wrong Answer

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

if a+b>=d+c:
  print ('Left')
elif a+b==d+c:
  print('Balanced')
else:
  print('Right')

Submission status: Wrong Answer

Solution code:
a,b,c,d = map(int,input().split())
if a+b>c+d:
  print("Left")
else:
  print("Right")

Submission status: Wrong Answer

Solution code:
A,B,C,D = [int(x) for x in input().split()]
if(A+B < C+D):
  print('Left')
elif(A+B == C+D):
  print('Balanced')
else:
  print('Right')

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split())
right = a+b
left = c+d
if(right<left):
  print("Left")
elif(left<right):
  print("Right")
else:
  print("Balanced")

Submission status: Wrong Answer

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

if a+b == c+d:
    print("Blanced")
elif a+b > c+d:
    print("Left")
else:
    print("Right")

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split())
if a+b<c+d:
  print('Left')
elif a+b<c+d:
  print('Right')
else:
  print('Balanced')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Mon Mar  4 15:01:58 2019

@author: kaned
"""
A,B,C,D=map(int,input().split())
L=A+B
R=C+D
if L<R:
    print('Left')
elif L>R:
    print('Right')
else:
    print("Balanced")

Submission status: Wrong Answer

Solution code:
a, b, c, d = map(int, input().split())
if (a + b) > (c + d):
    print("Left")
if (a + b) < (c + d):
    print("Right")
else:
    print("Balanced")

Submission status: Wrong Answer

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

if A+B >  C+D: print( 'Left' )
if A+B == C+D: print( 'Balanced' )
else:          print( 'Right' )

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split());print(["Balanced","Right","Left"][(a+b>c+d)-(a+b<c+d)])

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split());print(["Balanced","Right","Left"][(a+b>c+d)+(a+b<c+d)])

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split());print(["Balanced","Left","Right"][(a+b>c+d)+(a+b<c+d)])

Submission status: Wrong Answer

Solution code:
a,b,c,d=input().split();print(["Balanced","Left","Right"][(a+b>c+d)+(a+b<c+d)])

Submission status: Wrong Answer

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

if A+B > C+D:
    print("Left")
elif A+B < C+D:
    print("Rigft")
else:
    print("Balanced")

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split())
if a+b<c+d:
  print("Left")
elif a+b==c+d:
  print("Balanced")
else:
  print("Right")

Submission status: Wrong Answer

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

if a+b > c+d :
  print("Left")
if a+b < c+d :
  print("Right")
else:
  print("Balanced")

Submission status: Wrong Answer

Solution code:
""" AtCoder """

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

AB = A + B
CD = C + D

if AB < CD:
    print("Right")
elif AB == CD:
    print("Balanced")
else:
    print("Lift")

Submission status: Wrong Answer

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

print('Left' if A+B<C+D else 'Balanced' if A+B==C+D else 'Right')

Submission status: Wrong Answer

Solution code:
a,b,c,d = map(int,input().split())
if a + b < c + d:
    print('Left')
elif a + b == c + d:
    print('Balanced')
else:
    print('Right')

Submission status: Wrong Answer

Solution code:
A,B,C,D = map(int,input().split())
E = A+B
F = C+D
if E>F:
  print("Left")
elif E == F:
  print("Blanced")
else:
  print("Right")

Submission status: Wrong Answer

Solution code:
A,B,C,D = map(int,input().split())
X = A+B
Y = C+D
if X > Y:
    print("Left")
elif X < Y:
    print("Right")
else:
    print("Balaced")

Submission status: Wrong Answer

Solution code:
a, b, c, d = map(int, input().split())
if a+b > c+d:
  print('Left')
elif a+b < c+d:
  print('right')
else:
  print('Balanced')

Submission status: Wrong Answer

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


def main():
    """Function."""
    a, b, c, d = map(int, input().split())
    if a+b < c+d:
        print("Right")
    if a+b == c+d:
        print("Balanced")
    else:
        print("Left")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
A, B, C, D = map( int, input().split())
L = A + B
R = C + D
print(["Balanced","Left","Right"][R<L - R>L])

Submission status: Wrong Answer

Solution code:
A, B, C, D = map( int, input().split())
L = A + B
R = C + D
print(["Balance","Left","Right"][R<L - R>L])

Submission status: Wrong Answer

Solution code:
A, B, C, D = map( int, input().split())
L = A + B
R = C + D

if( L < R):
  print('Right')
  
else:
  print('Left')

Submission status: Wrong Answer

Solution code:
a,b,c,d = map(int, input().split())
s = a+b
t = c+d

if s>t:
  print("Left")
if s<t:
  print("Right")
else:
  print("Balanced")

Submission status: Wrong Answer

Solution code:
a,b,c,d=(int(i) for i in input().split(' '))
if a+b>c+d:
  print('Left')
elif a+b<c+d:
  print('Right')
elif a+b==c+d:
  print('Balance')
else:
  print('error')

Submission status: Wrong Answer

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

if A+B == C+D:
	print('Balanced')
elif A+B > C+D:
	print('Left')
else:
	print('right')

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split())
x=a+b;y=c+d
if x<y:
	print('Left')
elif x==y:
	print('Balanced')
else:
	print('Right')

Submission status: Wrong Answer

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

if a[0] + a[1] == a[2] + a[3]:
  print('Balanced')
elif a[0] + a[1] < a[2] + a[3]:
  print('Left')
else:
  print('Right')

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split())
if a+b>c+d:
    print("Left")
if a+b==c+d:
    print("Balanced")
else:
    print("Right")

Submission status: Wrong Answer

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

if (A + B > C + D):
    print("Left")
elif (A + B < C + D):
    print("Right")
else:
    print("Balannced")

Submission status: Wrong Answer

Solution code:
A, B, C, D = map(int, input().split())
if A + B == C + D:
  print('Balanced')
if A + B > C + D:
  print('Left')
if A + B == C + D:
  print('Right')

Submission status: Wrong Answer

Solution code:
a, b, c, d = map(int, input() .split())
if a + b > c + d:
    print("Left")
else:
    print("Right")

Submission status: Wrong Answer

Solution code:
a,b,c,d = (int(_) for _ in input().split())

if a+b > c+d:
    print('Left')
elif a+b < c+d:
    print('right')
else:
    print('Balanced')

Submission status: Wrong Answer

Solution code:
#83a
a,b,c,d=map(int,input().split())
if a+b==d+c:
    print('Balanced')
elif a*b<d+c:
    print('Right')
else:
    print('Left')

Submission status: Wrong Answer

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


if a+b > c+d:
    print("Left")
elif a+b < c+d:
    print("Right")
else:
    print("balanced")

Submission status: Wrong Answer

Solution code:
A,B,C,D=map(int,input().split())
if(A+B<C+D):
    print("Left")
if(A+B>C+D):
    print("Right")
if(A+B==C+D):
    print("Balanced")

Submission status: Wrong Answer

Solution code:
while True:
    a = input().split()
    N = [int(i) for i in a]
    A,B,C,D = N
    if  (A or B or C or D) < 1 or (A or B or C or D) > 10:
        continue
    if A+B > C+D:
        print('Left')
    if A+B < C+D:
        print('right')
    if A+B == C+D:
        print('Balanced')
    break

Submission status: Wrong Answer

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

r=A+B
l=C+D

if r>l:
    print("Right")
elif l>r:
    print("Left")
else:
    print("Balanced")

Submission status: Wrong Answer

Solution code:
w=map(int,raw_input().split())
l=sum(w[0:2])
r=sum(w[2:4])
if l<r:
  print 'Left'
elif l==r:
  print 'Balanced'
else:
  print 'Right'

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split())
print("Left"if a+b>c+d else "Right")

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
l, r = a[0] + a[1], a[2] + a[3]
if l > r:
  print('Left')
elif r < l:
  print('Right')
else:
  print('Balanced')

Submission status: Wrong Answer

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

if A+B == C+D:
    print('Valanced')
    
elif A+B > C+D:
    print('Left')

else:
    print('Right')

Submission status: Wrong Answer

Solution code:
a = input().split()
counter = 0

element = int(a[0])

while element <= int(a[1]):
    element *= 2
    counter += 1

print(counter)

Submission status: Wrong Answer

Solution code:
a,b,c,d = map(int,input().split())
if a+b > c+d:
    print("Left")
elif a+b < c+d:
    print("Right")
else:
    print("Blanced")

Submission status: Wrong Answer

Solution code:
a, b, c, d = map(int, input().split())
e = a + b - (c + d)
print("Left" if e>0 else "Blanced" if e==0 else "Right")

Submission status: Wrong Answer

Solution code:
a,b,c,d = map(int,input().split())
if (a+b)>(c+d): print('Left')
if (a+b)<(c+d): print('Right')
print('Balanced')

Submission status: Wrong Answer

Solution code:
A,B,C,D=map(int,input().split())
L=A+B
R=C+D
if L>R:
    print('Left')
elif L<R:
    print('Right')
else:
    print('Balance')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
a,b,c,d = map(int,(input().split()))
A = (a + b)
B = (c + d)
if A > B:
    print("Left")
else:
    print("Right")

Submission status: Wrong Answer

Solution code:
import numpy as np
from collections import Counter
import collections
round = lambda x:(x*2+1)//2
a = list(map(float,input().split()))
a = np.array(a)
b = a[0]+a[1]
c = a[2] + a[3]
if b > c:
  print('Left')
elif b == c :
  print('Right')
else :
  print('Balanced')

Submission status: Wrong Answer

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

l = a+b
r = c+d

if(l>r):
  print 'Left'
elif(l==r):
  print 'Blanced'
else:
  print 'Right'

Submission status: Wrong Answer

Solution code:
A, B, C, D = map(int, input().split())
L = A + B
R = C + D
if L < R:
	print('Left')
elif L==R:
	print('Balanced')
else:
	print('Right')

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split())
right=a+b
left=c+d
if right==left:
    print("Balanced")
elif right<left:
    print("Left")
elif left<right:
    print("Right")

Submission status: Wrong Answer

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

left = A + B
right = C + D

if left > right:
    print('Left')
elif left < right:
    print('Right')
else:
    print('Balaned')

Submission status: Wrong Answer

Solution code:
a,b,c,d = map(int,input().split())
right = a + b
left = c + d
 
if right > left:
  print('Right')
elif left > right:
  print('Left')
else:
  print('Balanced')

Submission status: Wrong Answer

Solution code:
a,b,c,d  = map(int,input().split(' '))
L = a+b
R = c+d
if L > R:
    print('Left')
elif L < R:
    print('Right')
else:
    print('Baranced')

Submission status: Wrong Answer

Solution code:

A,B,C,D = input().split( )

L=A+B
R=C+D
if L>R :
    print("Left")
elif L==R :
    print("Balanced")
else :
    print("Right")

Submission status: Wrong Answer

Solution code:

A,B,C,D = input().split( )

L=A+B
R=C+D
if L<R :
    print("Right")
elif L==R :
    print("Balanced")
else :
    print("Left")

Submission status: Wrong Answer

Solution code:
A,B,C,D = input().split( )
L=A+B
R=C+D
if L>R :
    print("right")
elif L==R :
    print("Balanced")
else :
    print("Left")

Submission status: Wrong Answer

Solution code:
A,B,C,D = input().split( )
L=A+B
R=C+D
if L<R :
    print("right")
elif L==R :
    print("Balanced")
else :
    print("Left")

Submission status: Wrong Answer

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

if a + b < c + d:
    print("Left")
if a + b > c + d:
    print("Right")
if a + b == c + d:
    print("Balance")

Submission status: Wrong Answer

Solution code:
s = input()
l = s.split()   #スペースで区切る 

A = int(l[0])
B = int(l[1])
C = int(l[2])
D = int(l[3])

if A + B > C + D:
    print('Left')
elif A + B < C + D:
    print('Right')
else:    
    print('Balance')

Submission status: Wrong Answer

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

if A+B > C+D:
    print("Left")
elif A+B == C+D:
    print("Balnced")
else:
    print("Right")

Submission status: Wrong Answer

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

if A + B > C + D:
    print("Right")
elif A + B < C + D:
    print("Left")
else:
    print("Balanced")

Submission status: Wrong Answer

Solution code:
a,b,c,d = map(int, input().split())
a += b
c += d
if a<c:
  print('Left')
if a==c:
  print('Balanced')
if a>c:
  print('Right')

Submission status: Wrong Answer

Solution code:
def answer():
    l = list(map(int,raw_input).split())
    if(l[0]+l[1]) > (l[2]+l[3]):
        return "Left"
    elif (l[0] + l[1]) < (l[2] + l[3]):
        return "Right"
    elif (l[0] + l[1]) == (l[2] + l[3]):
        return "Balanced"

Submission status: Wrong Answer

Solution code:
def answer():
    l = list(map(int,raw_input).split())
    if(l[0]+l[1]) > (l[2]+l[3]):
        print "Left"
    elif (l[0] + l[1]) == (l[2] + l[3]):
        print "Balanced"
    else:
        print "Right"

Submission status: Wrong Answer

Solution code:

a,b,c,d = map(int, input().split(" "))

if a+b < c+d :
    print("Right\n")
elif a+b > c+d:
    print("Left\n")
else :
    print("balanced\n")

Submission status: Wrong Answer

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

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

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    a,b,c,d = LI()
    a += b
    c += d
    if a<c:
        return 'Left'
    if a>c:
        return 'Right'

    return 'Balanced'



print(main())

Submission status: Wrong Answer

Solution code:
import sys

a = sys.stdin.readline()
A = a.rstrip()
b = sys.stdin.readline()
B = b.rstrip()
c = sys.stdin.readline()
C = c.rstrip()
d = sys.stdin.readline()
D = d.rstrip()

L = A + B
R = C + D

if L > R:
    print('Left')
elif L < R:
    print('Right')
elif L == R:
    print('Balanced')

Submission status: Wrong Answer

Solution code:
import sys

A = sys.stdin.readline()
B = sys.stdin.readline()
C = sys.stdin.readline()
D = sys.stdin.readline()


L = A + B
R = C + D

if L > R:
    print('Left')
elif L < R:
    print('Right')
elif L == R:
    print('Balanced')

Submission status: Wrong Answer

Solution code:
import sys

a = sys.stdin.readline()
A = a.rstrip()
b = sys.stdin.readline()
B = b.rstrip()
c = sys.stdin.readline()
C = c.rstrip()
d = sys.stdin.readline()
D = d.rstrip()

L = A + B
R = C + D

if L < R:
    print('Left')
elif L >R:
    print('Right')
elif L == R:
    print('Balanced')

Submission status: Wrong Answer

Solution code:
import sys

a = sys.stdin.readline()
A = a.rstrip()
b = sys.stdin.readline()
B = b.rstrip()
c = sys.stdin.readline()
C = c.rstrip()
d = sys.stdin.readline()
D = d.rstrip()
L = A + B
R = C + D
if L > R:
    print('Left')
elif L < R:
    print('Right')
else:
    print('Balanced')

Submission status: Wrong Answer

Solution code:
a,b,c,d = map(int, input().split())
a, c = a+b, c+d
if a == c:
  print('Balanced')
else:
  print(['right', 'Left'][a > c])

Submission status: Wrong Answer

Solution code:
a,b,c,d = map(int, input().split())
a, c = a+b, c+d
if a == c:
  print('Balanced')
elif a > c:
  print('Right')
else:
  print('Left')

Submission status: Wrong Answer

Solution code:
A, B, C, D= map(int, input().split())
L = A + B
R = C + D
if L >R:
    print("Left")
if L < R:
    print("Right")
else:
    print("Balanced")

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split())
suma=a+b
sumb=c+d
if suma>sumb:
    print('Left')
elif suma==sumb:
    print('Balance')
else:
    print('Right')

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split())
suma=a+b
sumb=c+d
if suma<sumb:
    print('Left')
elif suma==sumb:
    print('Balance')
else:
    print('Right')

Submission status: Wrong Answer

Solution code:
a,b,c,d=raw_input().split();print['Balanced','Left','Right'][cmp(a+b,c+d)]

Submission status: Wrong Answer

Solution code:
n=list(map(int,input().split()))
l=n[0]+n[1]
r=n[2]+n[3]
if l>=r:
    print('Left')
elif l==r:
    print('Balanced')
else:
    print('Right')

Submission status: Wrong Answer

Solution code:
a,b,c,d = input().split()
print("Left" if a + b > c + d else ("Right" if a + b < c + d else "Balanced"))

Submission status: Wrong Answer

Solution code:
A=3
B=2
C=1
D=4
L=A+B
R=C+D
if L<R:
    print("Right")
if L>R:
    print("Left")
if L==R:
    print("Balanced")

Submission status: Wrong Answer

Solution code:
a, b, c, d = map(int, input().split())
if a + b == c + d: print('Balenced')
if a + b > c + d: print('Left')
if a + b < c + d: print('Right')

Submission status: Wrong Answer

Solution code:
A,B,C,D = map(int,input().split())
if A+B < C+D:
    print('Left')
elif A+B == C+D:
    print('Balanced')
else:
    print('Right')

Submission status: Wrong Answer

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

if a+b < c+d :
    print("Left")
elif a+b > c+d:
    print("Right")
else:
    print("Balanced")

Submission status: Wrong Answer

Solution code:
s = input()

slist = s.split(" ")

left = int(slist[0]) + int(slist[1])

right = int(slist[2]) + int(slist[3])

if left > right:
    print("left")
	
elif left == right:
    print("Balanced")
	
else:
    print("right")

Submission status: Wrong Answer

Solution code:
s = input()

slist = s.split(" ")

left = slist[0] + slist[1]

Submission status: Wrong Answer

Solution code:
s = input()

slist = s.split(" ")

Submission status: Wrong Answer

Solution code:
import sys

def solve1(s):
    n = len(s)
    i = 0
    while i <= n // 2:
        if s[n // 2] != s[n // 2 - i]:
            break
        if s[(n - 1) // 2] != s[(n - 1) // 2 + i]:
            break
        i += 1
    return (n - 1) // 2 + i


line = sys.stdin.readline().strip()
print(solve1(list(line)))

Submission status: Wrong Answer

Solution code:
s = input()

print(s)

Submission status: Wrong Answer

Solution code:
s=input()
z="0"

while z in s:
    if z in s:
        z+="0"
    else:
        break

o="1"

while o in s:
    if o in s:
        o+="1"
    else:
        break

if len(z) == 2 and len(o) == 2:
    print(2)
elif len(z) >= len(o):
    print(len(z)-1)
else:
    print(len(o))

Submission status: Wrong Answer

Solution code:
INPUT=input()
IN=INPUT.split(" ")
X=int(IN[0])
Y=int(IN[1])
counter=0
while X<=Y:
    X=X*2
    counter+=1
print(counter)

Submission status: Wrong Answer

Solution code:
n=raw_input()
arr=[x for x in n]
print arr.count('0')

Submission status: Wrong Answer

Solution code:
import sys
from math import *
if __name__ =="__main__":
    str_in = input('input with blocks:')
    num = [int(n) for n in str_in.split()]
    A,B,C,D=num
    LEFT=A+B
    RIGHT=C+D
    if LEFT>RIGHT:
        print("Left")
    elif RIGHT>LEFT:
        print("Right")
    else:
        print("Balanced")

Submission status: Wrong Answer

Solution code:
IN=input()
s=IN.split(" ")
L=int(s[0])+int(s[1])
R=int(s[2])+int(s[3])
if L>R:
    print("Left")
if L==R:
    print("Balanced")
else:
    print("Right")

Submission status: Accepted

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

if A + B > C + D:
  print('Left')
elif A + B == C + D:
  print('Balanced')
else:
  print('Right')

Submission status: Accepted

Solution code:
a, b, c, d = map(int,input().split())
if a+b==c+d:
    print("Balanced")
elif a+b>c+d:
    print("Left")
else:
    print("Right")

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def I():
    #1 line 1 int
     return int(sys.stdin.readline().rstrip())
def LI():
    #1 line n int
     return list(map(int,sys.stdin.readline().rstrip().split()))
def S():
    #1 line 1 string
     return sys.stdin.readline().rstrip()
def LS():
    #1 line n strings
     return list(sys.stdin.readline().rstrip().split())

A,B,C,D,=LI()

if A + B > C + D:
    print("Left")
elif A + B == C + D:
    print("Balanced")
else:
    print("Right")

Submission status: Accepted

Solution code:
A, B, C, D = map(int,input().split())
if A + B < C + D:
  print("Right")
elif A + B == C + D:
  print("Balanced")
else:
  print("Left")

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
a = a[0] + a[1] - a[2] - a[3]
if a == 0:
    print('Balanced')
elif a > 0:
    print('Left')
else:
    print('Right')

Submission status: Accepted

Solution code:
A,B,C,D =map(int,input().split())
if A+B == C+D:
    print("Balanced")
else:
    print(("Left","Right")[A+B <C+D])

Submission status: Accepted

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

l=a+b;r=c+d

if l<r:
  print('Right')
  
elif l>r:
  print('Left')
  
else:
  print('Balanced')

Submission status: Accepted

Solution code:
x,y,z,w =map(int,input().split())
print("Left" if x+y>z+w else "Right" if x+y<z+w else "Balanced")

Submission status: Accepted

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

if a+b > c+d:
  print('Left')
elif a+b == c+d:
  print('Balanced')
else:
  print('Right')

Submission status: Accepted

Solution code:
A, B, C, D = map(int, input().split())
L, R = A+B, C+D
if L > R:
    print("Left")
elif L == R:
    print("Balanced")
else:
    print("Right")

Submission status: Accepted

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

if a+b > c+d:
    print('Left')
elif a+b == c+d:
    print('Balanced')
else:
    print('Right')

Submission status: Accepted

Solution code:
a, b, c, d = map(int, input().split())
l = a + b
r = c + d
if l > r:
    print('Left')
elif l < r:
    print('Right')
else:
    print('Balanced')

Submission status: Accepted

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

d = (int(lst[0]) + int(lst[1])) - (int(lst[2]) + int(lst[3]))

if d == 0:
   print('Balanced')
elif 0 < d:
   print('Left')
else:
   print('Right')

Submission status: Accepted

Solution code:
a,b,c,d=map(int,input().split())
l=a+b
r=c+d
if l>r:
  print('Left')
elif l==r:
  print('Balanced')
else:
  print('Right')

Submission status: Accepted

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

if a+b>c+d:
    ans="Left"
elif a+b<c+d:
    ans="Right"
else:
    ans="Balanced"
print(ans)