output_description stringlengths 15 956 | submission_id stringlengths 10 10 | status stringclasses 3 values | problem_id stringlengths 6 6 | input_description stringlengths 9 2.55k | attempt stringlengths 1 13.7k | problem_description stringlengths 7 5.24k | samples stringlengths 2 2.72k |
|---|---|---|---|---|---|---|---|
Print X, the expected value of the total execution time of the code, as an
integer. It can be proved that, under the constraints in this problem, X is an
integer not exceeding 10^9.
* * * | s513955380 | Wrong Answer | p03549 | Input is given from Standard Input in the following format:
N M | I = input()
s = I.split(" ")
A = list(map(int, s))
N = A[0]
M = A[1]
V = N - M
X = (100 * V + M * 1800) * (2) ** M
print(X)
| Statement
Takahashi is now competing in a programming contest, but he received TLE in a
problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases
in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2
probability in 1900 milliseconds, and correctly solve each of the other N-M
cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X
milliseconds. Print X (as an integer). | [{"input": "1 1", "output": "3800\n \n\nIn this input, there is only one case. Takahashi will repeatedly submit the\ncode that correctly solves this case with 1/2 probability in 1900\nmilliseconds.\n\nThe code will succeed in one attempt with 1/2 probability, in two attempts\nwith 1/4 probability, and in three attempts with 1/8 probability, and so on.\n\nThus, the answer is 1900 \\times 1/2 + (2 \\times 1900) \\times 1/4 + (3 \\times\n1900) \\times 1/8 + ... = 3800.\n\n* * *"}, {"input": "10 2", "output": "18400\n \n\nThe code will take 1900 milliseconds in each of the 2 cases, and 100\nmilliseconds in each of the 10-2=8 cases. The probability of the code\ncorrectly solving all the cases is 1/2 \\times 1/2 = 1/4.\n\n* * *"}, {"input": "100 5", "output": "608000"}] |
Print X, the expected value of the total execution time of the code, as an
integer. It can be proved that, under the constraints in this problem, X is an
integer not exceeding 10^9.
* * * | s580689595 | Runtime Error | p03549 | Input is given from Standard Input in the following format:
N M | import sys
input = sys.stdin.readline
n,m = map(int, input().split())
print((1900*m + 100*(n − m))*2**m) | Statement
Takahashi is now competing in a programming contest, but he received TLE in a
problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases
in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2
probability in 1900 milliseconds, and correctly solve each of the other N-M
cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X
milliseconds. Print X (as an integer). | [{"input": "1 1", "output": "3800\n \n\nIn this input, there is only one case. Takahashi will repeatedly submit the\ncode that correctly solves this case with 1/2 probability in 1900\nmilliseconds.\n\nThe code will succeed in one attempt with 1/2 probability, in two attempts\nwith 1/4 probability, and in three attempts with 1/8 probability, and so on.\n\nThus, the answer is 1900 \\times 1/2 + (2 \\times 1900) \\times 1/4 + (3 \\times\n1900) \\times 1/8 + ... = 3800.\n\n* * *"}, {"input": "10 2", "output": "18400\n \n\nThe code will take 1900 milliseconds in each of the 2 cases, and 100\nmilliseconds in each of the 10-2=8 cases. The probability of the code\ncorrectly solving all the cases is 1/2 \\times 1/2 = 1/4.\n\n* * *"}, {"input": "100 5", "output": "608000"}] |
Print X, the expected value of the total execution time of the code, as an
integer. It can be proved that, under the constraints in this problem, X is an
integer not exceeding 10^9.
* * * | s003720531 | Runtime Error | p03549 | Input is given from Standard Input in the following format:
N M | N,M = map(int, input().split())
ans = (1900*M + 100*(N − M)) * (2**M)
print(ans) | Statement
Takahashi is now competing in a programming contest, but he received TLE in a
problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases
in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2
probability in 1900 milliseconds, and correctly solve each of the other N-M
cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X
milliseconds. Print X (as an integer). | [{"input": "1 1", "output": "3800\n \n\nIn this input, there is only one case. Takahashi will repeatedly submit the\ncode that correctly solves this case with 1/2 probability in 1900\nmilliseconds.\n\nThe code will succeed in one attempt with 1/2 probability, in two attempts\nwith 1/4 probability, and in three attempts with 1/8 probability, and so on.\n\nThus, the answer is 1900 \\times 1/2 + (2 \\times 1900) \\times 1/4 + (3 \\times\n1900) \\times 1/8 + ... = 3800.\n\n* * *"}, {"input": "10 2", "output": "18400\n \n\nThe code will take 1900 milliseconds in each of the 2 cases, and 100\nmilliseconds in each of the 10-2=8 cases. The probability of the code\ncorrectly solving all the cases is 1/2 \\times 1/2 = 1/4.\n\n* * *"}, {"input": "100 5", "output": "608000"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s025342693 | Accepted | p02909 | Input is given from Standard Input in the following format:
S | n = input()
my_list = ["Sunny", "Cloudy", "Rainy", "Sunny"]
a = ""
for i in range(0, len(my_list)):
if n == my_list[i]:
a += my_list[i + 1]
break
print(a)
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s971867184 | Wrong Answer | p02909 | Input is given from Standard Input in the following format:
S | #!/usr/bin/env python3
# %% for atcoder uniittest use
import sys
input = lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):
return map(type, input().split())
def tupin(t=int):
return tuple(pin(t))
def lispin(t=int):
return list(pin(t))
# %%code
def resolve():
S = input()
W = ["Sunny", "Cloudy", "Rainy"]
if S == S[0]:
print(W[1])
elif S == S[1]:
print(W[2])
else:
print(W[0])
# %%submit!
resolve()
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s615678401 | Accepted | p02909 | Input is given from Standard Input in the following format:
S | print({"Sunny": "Cloudy", "Cloudy": "Rainy", "Rainy": "Sunny"}[input()])
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s824554090 | Wrong Answer | p02909 | Input is given from Standard Input in the following format:
S | print({"Sunny": "Clowdy", "Cloudy": "Rainy", "Rainy": "Sunny"}[input()])
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s195945446 | Wrong Answer | p02909 | Input is given from Standard Input in the following format:
S | input = input()
print(input)
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s021371505 | Runtime Error | p02909 | Input is given from Standard Input in the following format:
S | N = int(input())
print(N * N * N)
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s341401014 | Wrong Answer | p02909 | Input is given from Standard Input in the following format:
S | s = str(input())
if s == "S":
print("C")
elif s == "C":
print("R")
else:
print("S")
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s441895379 | Accepted | p02909 | Input is given from Standard Input in the following format:
S | # -*- coding: utf-8 -*-
import sys
def input():
return sys.stdin.readline().strip()
def list2d(a, b, c):
return [[c] * b for i in range(a)]
def list3d(a, b, c, d):
return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e):
return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1):
return int(-(-x // y))
def INT():
return int(input())
def MAP():
return map(int, input().split())
def LIST(N=None):
return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes():
print("Yes")
def No():
print("No")
def YES():
print("YES")
def NO():
print("NO")
sys.setrecursionlimit(10**9)
INF = float("inf")
MOD = 10**9 + 7
S = input()
if S == "Sunny":
print("Cloudy")
elif S == "Cloudy":
print("Rainy")
else:
print("Sunny")
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s110695384 | Accepted | p02909 | Input is given from Standard Input in the following format:
S | weathers = ["Sunny", "Cloudy", "Rainy"]
now = input()
now_index = weathers.index(now)
next_index = (now_index + 1) % len(weathers)
print(weathers[next_index])
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s483236805 | Wrong Answer | p02909 | Input is given from Standard Input in the following format:
S | S = input()
t = ["Sunny", "Cloudy", "Rainy"]
result = t.index(S)
if result < 2:
print(t[result])
else:
print(t[0])
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s542291052 | Accepted | p02909 | Input is given from Standard Input in the following format:
S | s = ["Sunny", "Cloudy", "Rainy", "Sunny"]
print(s[s.index(input()) + 1])
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s066043685 | Accepted | p02909 | Input is given from Standard Input in the following format:
S | d = ["Rainy", "Cloudy", "Sunny"]
print(d[d.index(input()) - 1])
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s757383530 | Wrong Answer | p02909 | Input is given from Standard Input in the following format:
S | s = {"Sunny": "Cloudy", "Cloudy": "Rainy", "Rainy": "Cloudy"}
print(s[input()])
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s976565712 | Runtime Error | p02909 | Input is given from Standard Input in the following format:
S | n = int(input())
print(n**3)
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s888970462 | Accepted | p02909 | Input is given from Standard Input in the following format:
S | import sys
stdin = sys.stdin
sys.setrecursionlimit(10**7)
def li():
return map(int, stdin.readline().split())
def li_():
return map(lambda x: int(x) - 1, stdin.readline().split())
def lf():
return map(float, stdin.readline().split())
def ls():
return stdin.readline().split()
def ns():
return stdin.readline().rstrip()
def lc():
return list(ns())
def ni():
return int(stdin.readline())
def nf():
return float(stdin.readline())
weather = ["Sunny", "Cloudy", "Rainy"]
s = ns()
if s == weather[0]:
print(weather[1])
elif s == weather[1]:
print(weather[2])
else:
print(weather[0])
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s038077765 | Runtime Error | p02909 | Input is given from Standard Input in the following format:
S | S = input()
odd = list(S[::2])
even = list(S[1::2])
xx = "No"
for i in range(len(odd)):
check = 0
if odd[i] == "L" or "U" or "D":
check += 1
if check == len(odd):
x = "Y"
for i in range(len(even)):
check2 = 0
if even[i] == "R" or "U" or "D":
check2 += 1
if check2 == len(even):
x2 = "Y"
if x and x2 == "Y":
xx = "Yes"
print(xx)
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s037617380 | Accepted | p02909 | Input is given from Standard Input in the following format:
S | # a,b=map(int,input().split())
# l=list(map(int,input().split()))
n = input()
print("Cloudy") if n[0] == "S" else print("Sunny") if n[0] == "R" else print("Rainy")
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s030771309 | Wrong Answer | p02909 | Input is given from Standard Input in the following format:
S | S = list(input())
K = "Yes"
for i in range(0, len(S)):
if i % 2 == 0:
if S[i] == "L":
K = "No"
break
else:
continue
else:
if S[i] == "R":
K = "No"
break
else:
continue
print(K)
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s704861760 | Runtime Error | p02909 | Input is given from Standard Input in the following format:
S | a = input("日本語で文を入力してください -> ")
b = input("調べたい文字は -> ")
print(a.find(b))
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s871238133 | Wrong Answer | p02909 | Input is given from Standard Input in the following format:
S | input = input("天気を入力:")
items = {"Sunny": "Cloudy", "Cloudy": "Rainy", "Rainy": "Sunny"}
print(items[input])
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s027919991 | Accepted | p02909 | Input is given from Standard Input in the following format:
S | L = ["Sunny", "Cloudy", "Rainy"]
print(L[L.index(input()) - 2])
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s918228478 | Accepted | p02909 | Input is given from Standard Input in the following format:
S | a = ["Sunny", "Cloudy", "Rainy", "Sunny"]
b = input()
print(a[a.index(b) + 1])
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s504035684 | Accepted | p02909 | Input is given from Standard Input in the following format:
S | d = {"Sunny": "Cloudy", "Cloudy": "Rainy", "Rainy": "Sunny"}
print(d[input().strip()])
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s387148627 | Runtime Error | p02909 | Input is given from Standard Input in the following format:
S | W = ["Sunny", "Cloudy", "Rainy"]
M = input()
print(W[W.index(M) + 1])
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s733144425 | Wrong Answer | p02909 | Input is given from Standard Input in the following format:
S | s = input().split(",")
print(*s)
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s233385372 | Wrong Answer | p02909 | Input is given from Standard Input in the following format:
S | t = input()
pred = {"Sunny": "Cloudy", "Cloudy": "Rainy", "Rainy": "Cloudy"}
print(pred[t])
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s992814605 | Runtime Error | p02909 | Input is given from Standard Input in the following format:
S | I = input()
K = ["Sunny", "Cloudy," "Rainy", "Sunny"]
Idx = K.index(I)
print(K[Idx + 1])
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print a string representing the expected weather tomorrow, in the same format
in which input is given.
* * * | s800614008 | Wrong Answer | p02909 | Input is given from Standard Input in the following format:
S | ans = input()
print(ans)
| Statement
The weather in Takahashi's town changes day by day, in the following cycle:
Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy, ...
Given is a string S representing the weather in the town today. Predict the
weather tomorrow. | [{"input": "Sunny", "output": "Cloudy\n \n\nIn Takahashi's town, a sunny day is followed by a cloudy day.\n\n* * *"}, {"input": "Rainy", "output": "Sunny"}] |
Print Q lines.
In the i-th line, print the answer for the i-th query.
* * * | s749981443 | Wrong Answer | p03027 | Input is given from Standard Input in the following format:
Q
x_1 d_1 n_1
:
x_Q d_Q n_Q | n = int(input())
for j in range(n):
import numpy
a = list(map(int, input().split(" ")))
b = []
for i in range(a[2]):
b.append(a[0] + ((i - 1) * (a[1])))
result = numpy.prod(b)
print(result % 1000003)
| Statement
Consider the following arithmetic progression with n terms:
* x, x + d, x + 2d, \ldots, x + (n-1)d
What is the product of all terms in this sequence? Compute the answer modulo
1\ 000\ 003.
You are given Q queries of this form. In the i-th query, compute the answer in
case x = x_i, d = d_i, n = n_i. | [{"input": "2\n 7 2 4\n 12345 67890 2019", "output": "9009\n 916936\n \n\nFor the first query, the answer is 7 \\times 9 \\times 11 \\times 13 = 9009.\nDon't forget to compute the answer modulo 1\\ 000\\ 003."}] |
Print Q lines.
In the i-th line, print the answer for the i-th query.
* * * | s274688668 | Runtime Error | p03027 | Input is given from Standard Input in the following format:
Q
x_1 d_1 n_1
:
x_Q d_Q n_Q | a = int(input())
i = 0
soma = 0
while i < a:
x = input().split()
x = list(map(int, x))
a = x[0]
q = x[1]
n = x[2]
if x[2] % 2 == 1:
m = a + (((n // 2) + 1) - 1) * q
soma = m * ((m**2) - (q**2))
else:
m = (a + q) + (((((n - 1) // 2) + 1) - 1) * q)
soma = m * ((m**2) - q**2)
soma = soma * a
print(soma % 1000003)
| Statement
Consider the following arithmetic progression with n terms:
* x, x + d, x + 2d, \ldots, x + (n-1)d
What is the product of all terms in this sequence? Compute the answer modulo
1\ 000\ 003.
You are given Q queries of this form. In the i-th query, compute the answer in
case x = x_i, d = d_i, n = n_i. | [{"input": "2\n 7 2 4\n 12345 67890 2019", "output": "9009\n 916936\n \n\nFor the first query, the answer is 7 \\times 9 \\times 11 \\times 13 = 9009.\nDon't forget to compute the answer modulo 1\\ 000\\ 003."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s814000338 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | 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") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s168097901 | Accepted | p03477 | Input is given from Standard Input in the following format:
A B C D | ###==================================================
### import
# import bisect
# from collections import Counter, deque, defaultdict
# from copy import deepcopy
# from functools import reduce, lru_cache
# from heapq import heappush, heappop
# import itertools
# import math
# import string
import sys
### stdin
def input():
return sys.stdin.readline().rstrip()
def iIn():
return int(input())
def iInM():
return map(int, input().split())
def iInM1():
return map(int1, input().split())
def iInLH():
return list(map(int, input().split()))
def iInLH1():
return list(map(int1, input().split()))
def iInLV(n):
return [iIn() for _ in range(n)]
def iInLV1(n):
return [iIn() - 1 for _ in range(n)]
def iInLD(n):
return [iInLH() for _ in range(n)]
def iInLD1(n):
return [iInLH1() for _ in range(n)]
def sInLH():
return list(input().split())
def sInLV(n):
return [input().rstrip("\n") for _ in range(n)]
def sInLD(n):
return [sInLH() for _ in range(n)]
### stdout
def OutH(lst, deli=" "):
print(deli.join(map(str, lst)))
def OutV(lst):
print("\n".join(map(str, lst)))
### setting
sys.setrecursionlimit(10**6)
### utils
int1 = lambda x: int(x) - 1
### constants
INF = int(1e9)
MOD = 1000000007
dx = (-1, 0, 1, 0)
dy = (0, -1, 0, 1)
###---------------------------------------------------
A, B, C, D = iInM()
if A + B > C + D:
print("Left")
elif A + B == C + D:
print("Balanced")
else:
print("Right")
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s981552279 | Wrong Answer | p03477 | Input is given from Standard Input in the following format:
A B C D | S = list(input())
lenS = len(S)
S = S + ["."]
K = lenS
i = 0
ps = S[0]
for s in S:
if s != ps:
K = min(K, max(i, lenS - i))
ps = s
i += 1
print(K)
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s121119321 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | # -*- coding: utf-8 -*-
#############
# Libraries #
#############
import sys
input = sys.stdin.readline
import math
from collections import deque
from fractions import gcd
from functools import lru_cache
#############
# Constants #
#############
MOD = 10**9+7
INF = float('inf')
#############
# Functions #
#############
######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]
#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)
######Combination######
kaijo_memo = []
def kaijo(n):
if(len(kaijo_memo) > n):
return kaijo_memo[n]
if(len(kaijo_memo) == 0):
kaijo_memo.append(1)
while(len(kaijo_memo) <= n):
kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
return kaijo_memo[n]
gyaku_kaijo_memo = []
def gyaku_kaijo(n):
if(len(gyaku_kaijo_memo) > n):
return gyaku_kaijo_memo[n]
if(len(gyaku_kaijo_memo) == 0):
gyaku_kaijo_memo.append(1)
while(len(gyaku_kaijo_memo) <= n):
gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
return gyaku_kaijo_memo[n]
def nCr(n,r):
if(n == r):
return 1
if(n < r or r < 0):
return 0
ret = 1
ret = ret * kaijo(n) % MOD
ret = ret * gyaku_kaijo(r) % MOD
ret = ret * gyaku_kaijo(n-r) % MOD
return ret
######Factorization######
def factorization(n):
arr = []
temp = n
for i in range(2, int(-(-n**0.5//1))+1):
if temp%i==0:
cnt=0
while temp%i==0:
cnt+=1
temp //= i
arr.append([i, cnt])
if temp!=1:
arr.append([temp, 1])
if arr==[]:
arr.append([n, 1])
return arr
#####LCM#####
def lcm(a, b):
return a * b // gcd (a, b)
#############
# Main Code #
#############
A,B,C,D = inputIL()
if A+B = C+D:
print("Balanced")
elif A+B>C+D:
print("Left")
else:
print("Right") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s815811218 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | N, A, B = input().split()
N, A, B = map(int, (N, A, B))
f = 0
for i in range(1, N + 1):
k = i
a = i // 10000
i = i - a * 10000
b = i // 1000
i = i - b * 1000
c = i // 100
i = i - c * 100
d = i // 10
i = i - d * 10
e = i
s = a + b + c + d + e
if A <= s <= B:
f += k
print(f)
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s757693759 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | import sys
input = sys.stdin.readline
A,B,C,D=list(map(int,input().split()))
if A+B == C+D:
print('Balanced')
elif A+B > C+D:
print('Left')
else:
print('Right')
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s589901761 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | I = input().split()
A, B, C, D = [int(i) for i in I]
if int(A + B > C + D:
print('Left')
elif A + B < C + D:
print('Right')
else:
print('Balanced')
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s833655547 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | n, a, b, = map(int,input().split())
ans = 0
for i in range(n+1):
if a <= sum(list(map(int,list(str(i))))) <= b
ans += i
print(ans)
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s634853897 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | a,b,c,d = map(int, input().split())
res = a+b - (c+d)
if res > 0:
print('Left')
elif res = 0:
print('Balanced')
else:
print('Right') | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s998634605 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | n=map(int,int(input().split(" ")))
if n[0]+n[1]>n[2]+n[3]:
print("Left")
elseif n[0]+n[1]==n[2]+n[3]:
print("Balaced")
else:
print("Right")
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s666656550 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | n=map(int,int(input().split(" ")))
if n[0]+n[1]>n[2]+n[3]:
print("Left")
else if n[0]+n[1]==n[2]+n[3]:
print("Balaced")
else:
print("Right")
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s579064768 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | n, a, b, = map(int,input().split())
ans = 0
for i in range(n+1):
if a <= sum(list(map(int,list(str)))) <= b
ans += i
print(ans)
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s684709730 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | a,b,c,d=map(int,input().split())
print([["Balanced,"Left"][a+b>c+d],"Right"][a+b<c+d]) | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s986444344 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | a,b,c,d=map(int,input().split())
[["Balanced,"Left"][a+b>c+d],"Right"][a+b<c+d] | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s625640445 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | 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") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s135683102 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | a
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s380104312 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | 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") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s173597819 | Wrong Answer | p03477 | Input is given from Standard Input in the following format:
A B C D | print("Hello")
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s550928155 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | a, b, c, d = map(int, input().split())
l = a + b
r = c + d
print("Left" if l > r else "Balanced" if l = r else "Right" if l < r else) | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s933942920 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | N,A,B = map(int, input().split())
arr = []
ans = 0
for i in range(N):
y = i
while y >= 1:
arr.append(int(i % 10))
i = int(i/10)
if sum(arr)>= A and sum(arr) <= B:
ans += sum(arr)
arr = []
else:
arr = []
ptint(ans)
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s893713698 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | A,B,C,D = map(int,input().split())
if (A+B) = (C+D):
print("Balanced")
elif (A+B) < (C+D):
print("Right")
else:
print("Left")
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s061010353 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | 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') | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s699538365 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | a, b, c, d = list(map(int, input().split()))
l = a+b
r = c+d
if l > r: print('Left')
elif: l < r: print('Right')
else: print('Balanced') | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s880308405 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | 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')
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s701697818 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | A = list(map(int, input().split(' ')))
L=A[0]+A[1]
R=A[2]+A[3]
if L<R: print("Right")
if L=R: print("Balanced")
if L>R: print("Left") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s412394507 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | 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')
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s613995267 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | 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') | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s951922192 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | a, b, c, d = map(int input())
l = a + b
r = c + d
if l > r:
print('Left')
elif l == r:
print('Balanced')
else:
print('Right') | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s037038201 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | A,B,C,D=list(map(int,input().split()))
if A+B>C+D:
print("Left")
elif A+B<C+D:
print("Right)
else:
print("Balanced") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s052513345 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | a,b,c,d=list(map(int,input().split()))
x=a+b
y=c+d
if x>y:
print("Left")
elif x<y:
print("Right")
else:
print("Balanced")
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s789919475 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | abcd=int(input().split())
a=abcd[0]
b=abcd[1]
c=abcd[2]
d=abcd[3]
if a+b=c+d:
print('balanced')
else:
if a+b>c+d:
print('Left')
else:
print('Right')
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s050482741 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | import std.stdio, std.string, std.conv;
void main(){
auto ip = readln.split.to!(int[]);
if(ip[0] + ip[1] > ip[2] + ip[3]){
writeln("Left");
}else if(ip[0] + ip[1] < ip[2] + ip[3]){
writeln("Right");
}else{
writeln("Balanced");
}
} | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s913634073 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | a = int(input())
b = int(input())
c = int(input())
d = int(input())
ab_count = a + b
cd_count = c + d
if ab_count > cd_count:
print('left')
else if ab_count == cd_count:
print('balanced')
elif:
print('light') | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s024172977 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | s = input()
slist = s.split(' ')
left = slist[0] + slist[1]
right = slist[2] + slist[3]
if left > right:
print('left')
else if left == right:
print('Balanced')
else:
print('right | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s830862446 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | s = input()
slist = s.split(' ')
left = int(slist[0]) + int(slist[1])
right = int(slist[2]) + int(slist[3])
if left > right:
print('left')
else if left == right:
print('Balanced')
else:
print('right') | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s899404585 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | a, b, c, d = list(map(int, input().split()))
A = a + b
B = c + d
if A == B:
print('Balanced')
else if A > B:
print('Left')
else if A < B:
print('Right') | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s783344556 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | A,B,C,D = input().split(' ')
A,B,C,D = [int(A),int(B),int(C),int(D)]
L= A + B
R = C + D
if L>R:
print("Left")
elif L=R:
print("Balanced")
else:
print("Right")
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s731463719 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | N,A,B=map(int,input().split())
#n1=N//10
#n2=N%10
#n=n1+n2
n=0
for i in range(N+1):
if N >=100:
i1=i//100
i2=(i-100)//10
i3=i%10
j=i1+i2+i3
if j>=A and j<=B:
n+=1
else:
i1=i//10
i2=i%10
j=i1+i2
if j>=A and j<=B:
n+=1
print(n) | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s063153251 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | A, B, C, D = [int(x) for x in input().split()]
def main();
ans = A + B - C - D
if ans > 0:
print('Left')
elif ans < 0:
print('Right')
else:
print('Balanced')
if __name == '__main__':
main() | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s428373459 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | #n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))
a,b,c,d =map(int,input().split())
m = a +b -c-d
if m>0:
print("Left")
elif m =0:
print("Balanced")
else:
print("Right") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s406057145 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | a, b, c, d = map(int, input().split(' '))
r = a + b
l = c + d
if l > r:
print('Left')
elsif l = r:
print('Balanced')
else:
print('Right')
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s192800787 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | a, b, c, d = map(int, input().split(' '))
r = a + b
l = c + d
if l > r:
print('left')
elsif l = r:
print('Balanced')
else:
print('Right') | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s055005667 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | a,b,c,d = (int(i) for i in input(.split()))
x = a + b
y = c + d
if x > y:
print('Left')
elif x < y:
print('Right')
else:
print('Balanced') | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s383023533 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | 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") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s079092066 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | # -*- coding: utf-8 -*-
n, a, b = list(map(int, input().split()))
s = 0
print(sum(i for i in range(1,n+1)) if a <= sum(map(int, str(i))) <= b)
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s708538201 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | A,B,C,D = map(int,input().split())
if A + B > C + D:
print("Left")
elif A + B < C + D:
print("Right")
elif A + B == C + D:
print("Balanced" | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s337010620 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | A, B, C, D = map(int, input().split(" "))
A + B = X
C + D = Y
if X == Y:
print("Balanced")
elif X > Y:
print("Left")
else:
print("Right")
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s200766141 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | 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") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s756079197 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | a,b,c,d=map(int,input().split())
print("balanced" if a+b=c+d else "left" if a+b>c+d else "right") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s152539384 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | a,b,c,d = map(int,input().split())
print("Left" if a+b > c+d elif a+b == c+d "Balanced" else "Right") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s953380712 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | s = input().replace(" ", "+")
l, r = eval(s[:3]), eval(s[4:])
print("RLiegfhtt"[l > r :: 2] if l != r else "Balanced")
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s194145933 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | A,B,C,D = map(int, input().split())
print('Left' if A+B > C+D else 'Balanced' A+B == C+D else 'Right') | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s428842930 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | 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") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s238673056 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D |
A, B, C, D = map(int, input().split())
print("Balanced" if A+B == C+D else "Left" if | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s078847075 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | x, y = map(int, input().split())
c = 2
z = 1
if x > 1:
c = x
while c * 2 <= y:
c *= 2
z += 1
print(z)
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s379876345 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | 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") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s846161657 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | A,B,C,D = map(int,input().split())
if A+B = C+D:
print("Balanced")
elif A+B < C+D:
print("Right")
else:
print("Left") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s930181276 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | A,B,C,D = map(int, input().split())
print('Left' if A+B > C+D 'Balanced' elif A+B == C+D else 'Right')
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s560860725 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | A,B,C,D=input().split( )
If(A+B<C+D)
print("right")
else if(A+B==C+D)
print("Balanced")
else if(A+B>C+D)
print("Left") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s329180510 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | a,b,c,d=map(int, input().split())
print('Balanced' if a+b==c+d 'Left' a+b>c+d else 'Right') | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s010403077 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | 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') | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s375571706 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | A, B, C, D = map(int, input().split())
print('Left' if (A + B) > C + D else 'Balanced' if (A + B) = (C + D) else 'Right') | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s815007439 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | A,B,C,D=input().split( )
L=A+B
R=C+D
If L<R:
print("right")
else if L==R:
print("Balanced")
else if L>R:
print("Left") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s644307751 | Accepted | p03477 | Input is given from Standard Input in the following format:
A B C D | #!/usr/bin/python3
# vim: set fileencoding=utf-8:
import sys
input = sys.stdin.readline
"""
H = int(input())
h = [int(ele) for ele in input().split()]
h = [0] + h
"""
def main():
ans = "Balanced"
A, B, C, D = map(int, input().split())
L = A + B
R = C + D
if L < R:
ans = "Right"
elif L > R:
ans = "Left"
print(ans)
def bfs(queue):
global yet, graph
if len(queue) == 0:
return
yet.remove(queue[-1])
for i, adjacency in enumerate(graph[queue[-1]]):
if (
adjacency == 1 and (i in yet) and (i not in queue)
): # 隣接かつ未探索であれば、stackにpush
queue.appendleft(i)
else:
queue.pop()
bfs(queue)
def dfs(stack):
global yet, graph
yet.remove(stack[-1])
for i, adjacency in enumerate(graph[stack[-1]]):
if adjacency == 1 and i in yet: # 隣接かつ未探索であれば、stackにpush
stack.append(i)
dfs(stack)
else:
stack.pop()
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5) + 1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n // i)
return divisors
class Node:
def __init__(self):
self.idx = None
self.left = None
self.right = None
self.parent = None
return
def pre_order(self):
global pre_order_str
pre_order_str += str(self.idx) + " "
if self.left:
self.left.pre_order()
if self.right:
self.right.pre_order()
def in_order(self):
global in_order_str
if self.left:
self.left.in_order()
in_order_str += str(self.idx) + " "
if self.right:
self.right.in_order()
def post_order(self):
global post_order_str
if self.left:
self.left.post_order()
if self.right:
self.right.post_order()
post_order_str += str(self.idx) + " "
class HeapHelper:
"""HeapContrler.
完全二分木を二分ヒープで表現した配列 A に対して、
HeapHelper.parent(idx) とするとそのノードの親の添字を返す
存在しない場合は Falseを返す
Returns:
[type] -- [description]
"""
def __init__(self):
return
@staticmethod
def parent(i):
if i == 1:
return False
return int(i / 2)
@staticmethod
def left(i):
l_idx = 2 * i
if H < l_idx:
return False
return l_idx
@staticmethod
def right(i):
r_idx = 2 * i + 1
if H < r_idx:
return False
return r_idx
if __name__ == "__main__":
main()
| 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s263813537 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | n,a,b = int(input().split())
ans = 0
for i in range(n+1):
if a<= sum(list(map(int,list(str(i))))) <= b:
ans += i:
print(ans) | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s623421599 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | A,B,C,D = map(int,input().split())
if A+B > C+D:
print("Left")
elif A+B == C+D:
print("Blanced")
else:
print("Right") | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Print `Left` if the balance scale tips to the left; print `Balanced` if it
balances; print `Right` if it tips to the right.
* * * | s339341837 | Runtime Error | p03477 | Input is given from Standard Input in the following format:
A B C D | 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') | 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. | [{"input": "3 8 7 1", "output": "Left\n \n\nThe total weight of the masses on the left pan is 11, and the total weight of\nthe masses on the right pan is 8. Since 11>8, we should print `Left`.\n\n* * *"}, {"input": "3 4 5 2", "output": "Balanced\n \n\nThe total weight of the masses on the left pan is 7, and the total weight of\nthe masses on the right pan is 7. Since 7=7, we should print `Balanced`.\n\n* * *"}, {"input": "1 7 6 4", "output": "Right\n \n\nThe total weight of the masses on the left pan is 8, and the total weight of\nthe masses on the right pan is 10. Since 8<10, we should print `Right`."}] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.