Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
"""
E-Knapsack2
Wが10**9まであるのでdpの置き方を工夫する。
dp[i]:=価値がiのときのナップザックの重さ
"""
N,W = map(int,input().split())
dp = [0]+[W+1]*(N*10**3)
for i in range(N):
    w,v = map(int,input().split())
    for j in range(N*10**3+1-v)[::-1]:
        dp[j+v] = min(dp[j+v],dp[j]+w)
for i in range(N*10**3+1)[::-1]:
    if dp[i]<=W:
        print(i)
        exit()

Fixed submission:
"""
E-Knapsack2
Wが10**9まであるのでdpの置き方を工夫する。
dp[i]:=価値がiのときのナップザックの重さ
"""
N,W = map(int,input().split())
dp = [0]+[W+1]*(N*10**3)
for i in range(N):
    w,v = map(int,input().split())
    for j in range(N*10**3+1-v)[::-1]:
        dp[j+v] = min(dp[j+v],dp[j]+w)
for i in range(N*10**3+1)[::-1]:
    if dp[i]<=W:
        print(i)
        exit()

Buggy python submission (verdict: Runtime Error):
""""
E-Knapsack2
Wが10**9まであるのでdpの置き方を工夫する。
dp[i]:=価値がiのときのナップザックの重さ
""""
N,W = map(int,input().split())
dp = [0]+[W+1]*(N*10**3)
for i in range(N):
    w,v = map(int,input().split())
    for j in range(N*10**3+1-v)[::-1]:
        dp[j+v] = min(dp[j+v],dp[j]+w)
for i in range(N*10**3+1)[::-1]:
    if dp[i]<=W:
        print(i)
        exit()

Fixed submission:
"""
E-Knapsack2
Wが10**9まであるのでdpの置き方を工夫する。
dp[i]:=価値がiのときのナップザックの重さ
"""
N,W = map(int,input().split())
dp = [0]+[W+1]*(N*10**3)
for i in range(N):
    w,v = map(int,input().split())
    for j in range(N*10**3+1-v)[::-1]:
        dp[j+v] = min(dp[j+v],dp[j]+w)
for i in range(N*10**3+1)[::-1]:
    if dp[i]<=W:
        print(i)
        exit()

Buggy python submission (verdict: Time Limit Exceeded):
N,W=map(int,input().split())
DP=[[0 for j in range(W+1)]for i in range(N+1)]
for i in range(N):
    w,v=map(int,input().split())
    for j in range(1,W+1):
        if j>=w:
            DP[i+1][j]=max(DP[i][j-w]+v,DP[i][j])
        else:
            DP[i+1][j]=DP[i][j]
print(DP[N][W])


Fixed submission:
"""
E-Knapsack2
Wが10**9まであるのでdpの置き方を工夫する。
dp[i]:=価値がiのときのナップザックの重さ
"""
N,W = map(int,input().split())
dp = [0]+[W+1]*(N*10**3)
for i in range(N):
    w,v = map(int,input().split())
    for j in range(N*10**3+1-v)[::-1]:
        dp[j+v] = min(dp[j+v],dp[j]+w)
for i in range(N*10**3+1)[::-1]:
    if dp[i]<=W:
        print(i)
        exit()
Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
A = list(map(int,input().split()))

dp = [False]*(K+1)

for i in range(K+1):
    for j in range(N):
        if i-A[j]>=0 and dp[i-A[j]] == False:
            dp[i] = True

        
if dp[K]:
    print("First")
else:
    print("Second")

Fixed submission:
n,k = map(int,input().split())
arr = list(map(int,input().split()))

dp = [False]*(k+1)

for stones in range(k+1):
    for x in arr:
        if stones >= x and dp[stones-x] == False:
            dp[stones] = True

if dp[k]:
    print("First")
else:
    print("Second")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
*A, = map(int, input().split())
DP = [[0 for j in range(n+1)] for i in range(n+1)]
for l in range(1, n+1):
    for i in range(n-l+1):
        j = i+l
        DP[i][j] = max(A[i]-DP[i+1][j], A[j-1]-DP[i][j-1])
print(DP[0][n])

Fixed submission:
n = int(input())
*A, = map(int, input().split())
DP = [[0 for j in range(n+1)] for i in range(n+1)]
for l in range(1, n+1):
    for i in range(n-l+1):
        j = i+l
        DP[i][j] = max(A[i]-DP[i+1][j], A[j-1]-DP[i][j-1])
print(DP[0][n])
Buggy python submission (verdict: Runtime Error):
n=int(input())
t,a=map(int,input().split())
H=list(map(int,input().split()))
minn=10**10
for i in range(n):
  if minn>abs((t*(1000)-6*H[i])-a*1000):
    ans = H[i]
    minn=t*(1000)-6*H[i]
print(ans)
  


Fixed submission:
A,B=map(int,input().split())
print(A+B//2)

Buggy python submission (verdict: Runtime Error):
n=int(input())
t,a=map(int,input().split())
H=list(map(int,input().split()))
minn=10**10
for i in range(n):
  if minn>abs((t*(1000)-6*H[i])-a):
    ans = H[i]
    minn=t*(1000)-6*H[i]
print(ans)
  


Fixed submission:
A,B=map(int,input().split())
print(A+B//2)
Buggy python submission (verdict: Runtime Error):
n=int(input())
t,a=map(int,input().split())
H=list(map(int,inpt().split()))
minn=10**10
for i in range(n):
  if minn>abs((t*(1000)-6*H[i])-a):
    ans = H[i]
    minn=t*(1000)-6*H[i]
print(ans)
  

Fixed submission:
n=int(input())
t,a=map(int,input().split())
H=list(map(int,input().split()))
minn=10**10
for i in range(n):
  if minn>abs((t*(1000)-6*H[i])-a*1000):
    ans = i
    minn=abs((t*(1000)-6*H[i])-a*1000)
print(ans+1)

Buggy python submission (verdict: Runtime Error):
n=int(input())
t,a=map(int,input().split())
H=list(map(int,inpt().split()))
minn=10**10
for i in range(n):
  if minn>t*(1000)-6*H[i]:
    ans = H[i]
    minn=t*(1000)-6*H[i]
print(ans)
  

Fixed submission:
n=int(input())
t,a=map(int,input().split())
H=list(map(int,input().split()))
minn=10**10
for i in range(n):
  if minn>abs((t*(1000)-6*H[i])-a*1000):
    ans = i
    minn=abs((t*(1000)-6*H[i])-a*1000)
print(ans+1)
Buggy python submission (verdict: Runtime Error):
N,T=map(int,input().split())
cc=1000
for i in range(N):
  c,t=map(int,input().split())
  if cc>c and T=>t:
    cc=c
if cc==1000:
  print("TLE")
else:
  print(cc)

Fixed submission:
N,T=map(int,input().split())
cc=1001
for i in range(N):
  c,t=map(int,input().split())
  if cc>c and T>=t:
    cc=c
if cc==1001:
  print("TLE")
else:
  print(cc)
Buggy python submission (verdict: Runtime Error):
n=int(input())
if n[0]=<n[1] or (n[0]==n[1] and n[0]=<n[2]):
  print(str(n[0]+1)*3)
else:
  print(str(n[0])*3)

Fixed submission:
n=list(map(int,input()))
if n[0]<n[1] or (n[0]==n[1] and n[0]<n[2]):
  print(str(n[0]+1)*3)
else:
  print(str(n[0])*3)
Buggy python submission (verdict: Runtime Error):
S=list(input().split())
AS=sorted(S)
print(int((S[2]+S[1])+int(S[0]))

Fixed submission:
S=list(map(int,input().split()))
AS=sorted(S)
print(int(str(AS[2])+str(AS[1]))+int(AS[0]))
Buggy python submission (verdict: Runtime Error):
n,m,x,y=map(int,input().split())
xx=list(map(int,input().split()))
yy=list(map(int,input().split()))
xxx=max(xx+list(x))
yyy=min(yy+list(y))
if xxx<yyy:
  print("No War")
else:
  print("War")

Fixed submission:
n, m, x, y = map(int, input().split())
xx = list(map(int, input().split()))
yy = list(map(int, input().split()))
xxx = max(xx + [x])
yyy = min(yy + [y])
if xxx < yyy:
    print("No War")
else:
    print("War")
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()
ans=0
for i in range(n):
  keep=s[-1]
  s=input()
  if keep != s[0]:
    ans=1
  else:
    continue
print(["Yes","No"][ans])
    
  

Fixed submission:
n=int(input())
check=[]
s=input()
check.append(s)
ans=0
for i in range(n-1):
  keep=s[-1]
  s=input()
  if keep != s[0]:
    ans=1
  if str(s) in check:
    ans = 1
  else:
    check.append(s)
print(["Yes","No"][ans])
Buggy python submission (verdict: Runtime Error):
rint("a", ord("a"))
print("z", ord("z"))

s = input()
n = len(s)
ans = 1
if s[0] != "A":
    ans *= 0
if not (97 <= ord(s[1]) <= 122):
    ans *= 0
if not (97 <= ord(s[-1]) <= 122):
    ans *= 0

check = 0
for i in range(1, n - 1):
    if s[i] == "C":
        check += 1
print(["WA", "AC"][ans & (check == 1)])

Fixed submission:
s = input()
n = len(s)
ans = 1
if s[0] != "A":
    ans *= 0
if not (97 <= ord(s[1]) <= 122):
    ans *= 0
if not (97 <= ord(s[-1]) <= 122):
    ans *= 0

check = 0
for i in range(1, n - 1):
    if s[i] == "C":
        check += 1
print(["WA", "AC"][ans & (check == 1)])
Buggy python submission (verdict: Runtime Error):
S=input().split()
A=sorted(S)
print(S[2]-S[0])


Fixed submission:
S=list(map(int,input().split()))
A=sorted(S)

print(A[2]-A[0])
Buggy python submission (verdict: Runtime Error):
S=input()
ans=0
for i in range(len(S)):
  if S[i]=="-":
    ans-=1:
  else:
    ans+=1
print(ans)

Fixed submission:
S=input()
ans=0
for i in range(len(S)):
  if S[i]=="-":
    ans-=1
  else:
    ans+=1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import collections
n = int(input())
s = input()
minn = n
for i in range(n):
    l = s[:i].count("W")
    r = s[i + 1:].count("E")
    if minn > l + r:
        minn = l + r
print(minn)


Fixed submission:
import collections
n = int(input())
s = input()
l = s.count("W")
r = s.count("E")
ans = 0
keep = r
minn = keep
if s[0] == "E":
    ans = 1
for i in range(1, n):
    if s[i - 1:i + 1] == "WW":
        keep += 1
    elif s[i - 1:i + 1] == "WE":
        keep += 0
    elif s[i - 1:i + 1] == "EW":
        keep += 0
    elif s[i - 1:i + 1] == "EE":
        keep -= 1
    if minn > keep:
        minn = keep
print([minn, minn - 1][ans])
Buggy python submission (verdict: Runtime Error):
import heapq

N,X = map(int,input().split())
m=[]
for _ in range(N):
    M = int(input())
    m.append(M)

sum_m = sum(m)
heapq.heapify(m)
min_m = heapq.heappop(m)

ans = N

A=X-sum_m
while A-min_m >0:
    A-=min_m
    ans+=1
print(ans)

Fixed submission:
S=input()
ans=700
for i in S:
  if i=="o":
    ans+=100
print(ans)
Buggy python submission (verdict: Runtime Error):
A,B,X=map(int,input().split())
if B<=X-A:
  print("YES")
eles:
  print("NO")


Fixed submission:
A,B,X=map(int,input().split())
if A+B>=X and A<=X:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
A,B,X=map(int,input().split())
if B<==X-A:
  print("YES")
eles:
  print("NO")

Fixed submission:
A,B,X=map(int,input().split())
if A+B>=X and A<=X:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
import math

n = int(input())
a = list(map(int, input().split()))
a = sorted(a)
ans = 0
for i in range(n):
    if ans < math.factorial(a[-1]) // (math.factorial(a[i]) * math.factorial(a[-1] - a[i])):
        keep = a[i]
        ans = math.factorial(a[-1]) // (math.factorial(a[i]) * math.factorial(a[-1] - a[i]))
print(a[-1], keep)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
a = sorted(a)
check = a[-1] / 2
MIN = 10 ** 10

for i in range(n - 1):
    if abs(a[i] - check) < MIN:
        keep = i
        MIN = abs(a[i] - check)

print(a[-1], a[keep])
Buggy python submission (verdict: Runtime Error):
for i in range(3):
  s=input()
  ans+=s[i]
print(ans)

Fixed submission:
ans=""
for i in range(3):
  s=input()
  ans+=s[i]
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
lis=list(map(int,input().split()))
ans=0
for i in range(n):
  if i == "P":
    ans=1
print(["Three","Four"][ans])

Fixed submission:
n=int(input())
lis=list(input().split())
ans=0
for i in range(n):
  if lis[i] == "Y":
    ans=1
print(["Three","Four"][ans])
Buggy python submission (verdict: Runtime Error):
print("Odd") if int(input())*int(input())%2==1 else print("Even")

Fixed submission:
S=list(input().split())
print("Odd") if int(S[0])*int(S[1])%2==1 else print("Even")
Buggy python submission (verdict: Runtime Error):
S=input()
S[3]="8"
print(S)


Fixed submission:
print("2018"+input()[4:])
Buggy python submission (verdict: Runtime Error):
n=int(input)
for i in range(n):
  keep.append(int(input()))

print(len(set(keep)))

Fixed submission:
n=int(input())
keep=[]
for i in range(n):
  keep.append(int(input()))

print(len(set(keep)))
Buggy python submission (verdict: Runtime Error):
A,B,C,D=map(int,input())
e=A+B-C-D
print("Balanced")if e==0 else print(["Left",0,"Right"][e/abs(e)])


Fixed submission:
A,B,C,D=map(int,input().split())
e=A+B-C-D
print("Balanced")if e==0 else print(["","Left","Right"][int(e/abs(e))])

Buggy python submission (verdict: Runtime Error):
A,B,C,D=map(int,input())
e=A+B-C-D
print("Balanced")if e==0 else print(["Left","Right"][e/abs(e)])

Fixed submission:
A,B,C,D=map(int,input().split())
e=A+B-C-D
print("Balanced")if e==0 else print(["","Left","Right"][int(e/abs(e))])
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input())
print((a+b-0.01)//2+1)

Fixed submission:
a,b=map(int,input().split())
print(int((a+b-0.01)//2+1))
Buggy python submission (verdict: Runtime Error):
print(sum(list(int,input().split())))

Fixed submission:
S=input()
print(int(S[0])+int(S[1])+int(S[2]))
Buggy python submission (verdict: Runtime Error):
s=input()
ss=int(s)
keep=0
for i in range(len(s)):
  keep+=int(i)
if ss%keep==0:
  print("Yes")
else:
  print("No")


Fixed submission:
s=input()
ss=int(s)
keep=0
for i in range(len(s)):
  keep+=int(s[i])
if ss%keep==0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=0
for i in range(2):
  if n[i]==n[i+1] and n[i+1]==n[i+2]:
    a=1
print(["No","Yes"][a])

Fixed submission:
n=input()
a=0
for i in range(2):
  if n[i]==n[i+1] and n[i+1]==n[i+2]:
    a=1
print(["No","Yes"][a])
Buggy python submission (verdict: Runtime Error):
a,b=map(input().split())
A=chr(a)
B=chr(b)
if A>B:
  print(">")
elif A<B:
  print("<")
else:
  print("=")


Fixed submission:
S=input()
A=ord(S[0])
B=ord(S[2])

if A>B:
  print(">")
elif A<B:
  print("<")
else:
  print("=")

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
A=chr(a)
B=chr(b)
if A>B:
  print(">")
elif A<B:
  print("<")
else:
  print("=")


Fixed submission:
S=input()
A=ord(S[0])
B=ord(S[2])

if A>B:
  print(">")
elif A<B:
  print("<")
else:
  print("=")

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
A=ord(a)
B=ord(b)
if A>B:
  print(">")
elif A<B:
  print("<")
else:
  print("=")


Fixed submission:
S=input()
A=ord(S[0])
B=ord(S[2])

if A>B:
  print(">")
elif A<B:
  print("<")
else:
  print("=")

Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
if A>B:
  print(">")
elif A<B:
  print("<")
else:
  print("=")


Fixed submission:
S=input()
A=ord(S[0])
B=ord(S[2])

if A>B:
  print(">")
elif A<B:
  print("<")
else:
  print("=")

Buggy python submission (verdict: Runtime Error):
A,B=int(input())
if A>B:
  print(">")
elif A<B:
  print("<")
else:
  print("=")

Fixed submission:
S=input()
A=ord(S[0])
B=ord(S[2])

if A>B:
  print(">")
elif A<B:
  print("<")
else:
  print("=")
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
s_length = len(s)
t_length = len(t)

ans = ''
keep = ''
check = False
ans_remind = 0

for i in range(s_length):
    if s[i] == t[0]:
        check2 = True
        for j in range(t_length):
            if (s[i + j] != t[j]) & (s[i + j] != '?'):
                check2 = False
        if check2:
            check = True
            ans = keep + t
            ans_remind = i + t_length

    if s[i] == '?':
        keep += 'a'
        i += 1
    else:
        keep += s[i]
        i += 1

ans = ans + keep[ans_remind:]
if check:
    print(ans)
else:
    print('UNRESTORABLE')


Fixed submission:
s = input()
t = input()

s_length = len(s)
t_length = len(t)

ans = ''
keep = ''
remind = 0
checker = False
for i in range(s_length):
    if (i + t_length) <= s_length:
        check = True
        for j in range(t_length):
            if (s[i + j] != t[j]) & (s[i + j] != '?'):
                check = False
        if check:
            checker = True
            ans = keep + t
            remind = i + t_length
    if s[i] == '?':
        keep += 'a'
    else:
        keep += s[i]
ans = ans + keep[remind:]

if checker:
    print(ans)
else:
    print('UNRESTORABLE')
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
keep = []
ans = 0
for i in range(n):
    j = int(input())
    if j in keep:
        keep.remove(j)
        ans -= 1
    else:
        keep.append(j)
        ans += 1
print(ans)


Fixed submission:
import collections


n = int(input())
keep = []
ans = 0
for i in range(n):
    j = int(input())
    keep.append(j)

c = collections.Counter(keep)
print(len([i[0] for i in c.items() if i[1] % 2 != 0]))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
keep = []
ans = 0
for i in range(n):
    j = int(input())
    if j in keep:
        keep.remove(j)
        ans -= 1
    else:
        keep.append(j)
        ans += 1
print(ans)


Fixed submission:
import collections


n = int(input())
keep = []
ans = 0
for i in range(n):
    j = int(input())
    keep.append(j)

c = collections.Counter(keep)
print(len([i[0] for i in c.items() if i[1] % 2 != 0]))
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
a=list(map(int,input().split()))
b=sorted(a)
ans=0
for i in range(1,k+1):
  ans+=b[(-1)*i]
print(ans)


Fixed submission:
a,b=map(int,input().split())
if a*b*(a+b)%3==0:
  print("Possible")
else:
  print("Impossible")

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a*b*(a+b)%3==0:
  print(""Possible")
else:
        print("Impossible")

Fixed submission:
a,b=map(int,input().split())
if a*b*(a+b)%3==0:
  print("Possible")
else:
  print("Impossible")

Buggy python submission (verdict: Runtime Error):
N=int(input())
a=list(map(int,input().split()))
S=sum(a)
SS=0
mi=abs(S-SS)
for i in range(N):
  S=S-a[i]
  SS=SS+a[i]
  if mi>=abs(S-SS):
    mi=abs(S-SS)
print(mi)

Fixed submission:
a,b=map(int,input().split())
if a*b*(a+b)%3==0:
  print("Possible")
else:
  print("Impossible")
Buggy python submission (verdict: Runtime Error):
x,a,b=map(int,input().split())
print("delicious")if a>b print("safe")elif x+a>b else print("dangerous")

Fixed submission:
x,a,b=map(int,input().split())
if a>=b:
  print("delicious")
elif x+a>=b:
  print("safe")
else:
  print("dangerous")
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = [int(input()) for i in range(N)]
def check_num(a,b):
    if b>N+1:
        return -1
    if A[a]==2:
        return b
    else:
        return check_num(int(A[a])-1,b+1)
print(check_num(0,1))

Fixed submission:
n = int(input())
lis = []
for i in range(n):
    lis.append(int(input()))

k = 1
ans = 0
m = 0
while k != 2 and m < n:
    k = lis[k - 1]
    m += 1
if k == 2:
    print(m)
else:
    print("-1")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ans = 100000
for i in range(1,  10 ** 10):
    if N % i == 0:
        ans = min(ans, max(len(str(i)), len(str(N // i))))

print(ans)


Fixed submission:
N = int(input())
ans = 100000
for i in range(1, 10 ** 5):
    if N % i == 0:
        ans = min(ans, max(len(str(i)), len(str(N // i))))

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ans = 100000
for i in range(1, 2 * 10 ** 7):
    if N % i == 0:
        ans = min(ans, max(len(str(i)), len(str(N // i))))

print(ans)


Fixed submission:
N = int(input())
ans = 100000
for i in range(1, 10 ** 5):
    if N % i == 0:
        ans = min(ans, max(len(str(i)), len(str(N // i))))

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ans = 100000
for i in range(1, 3 * 10 ** 7):
    if N % i == 0:
        ans = min(ans, max(len(str(i)), len(str(N // i))))

print(ans)


Fixed submission:
N = int(input())
ans = 100000
for i in range(1, 10 ** 5):
    if N % i == 0:
        ans = min(ans, max(len(str(i)), len(str(N // i))))

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ans = 100000
for i in range(1, 10 ** 8):
    if N % i == 0:
        ans = min(ans, max(len(str(i)), len(str(N // i))))

print(ans)


Fixed submission:
N = int(input())
ans = 100000
for i in range(1, 10 ** 5):
    if N % i == 0:
        ans = min(ans, max(len(str(i)), len(str(N // i))))

print(ans)
Buggy python submission (verdict: Runtime Error):
N=int(input())
ans=1
for i in range(1,n+1):
    ans=(ans*i)%1000000007
print(ans%(10**9+7))

Fixed submission:
N=int(input())
ans=1
for i in range(1,N+1):
    ans=(ans*i)%1000000007
print(ans%(10**9+7))

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
ans=1
while N>0:
    ans*=N%(10**9+7)
    N=N-1
print(ans%(10**9+7))

Fixed submission:
N=int(input())
ans=1
for i in range(1,N+1):
    ans=(ans*i)%1000000007
print(ans%(10**9+7))
Buggy python submission (verdict: Runtime Error):
A,B=map(int,input(),split())
a=A%13
b=B%13
if A>B:
  print("Alice")
elif B>A:
  print("Bob")
else:
  print("Draw")
  


Fixed submission:
A,B=map(int,input().split())
a=14 if A==1 else A
b=14 if B==1 else B
if a>b:
  print("Alice")
elif b>a:
  print("Bob")
else:
  print("Draw")
Buggy python submission (verdict: Runtime Error):
X=list(map(int,input().split()))
#X軸に並行
if X[2]-X[0]==0:
    if X[3]-X[1]>0:
        q=X[3]-X[1]
        U="U"
        D="D"
    else:
        q=X[1]-X[3]
        U="U"
        D="D"
    print(U*(q+1)+R*2+D*(q+2)+L*2+U+L+U*q+R*2+D*q+L)
#Y軸に並行
if X[3]-X[1]==0:
    if X[2]-X[0]>0:
        p=X[2]-X[0]
        R="R"
        L="L"
    else:
        p=X[0]-X[2]
        R="L"
        L="R"
    print(R*(p+1)+U*2+L*(p+2)+D*2+R+D+R*p+U*2+L*p+D)
 
if X[2]-X[0]!=0 and X[3]-X[1]!=0
    if X[2]-X[0]>0:
        p=X[2]-X[0]
        R="R"
        L="L"
    else:
        p=X[0]-X[2]
        R="L"
        L="R"
    if X[3]-X[1]>0:
        q=X[3]-X[1]
        U="U"
        D="D"
    else:
        q=X[1]-X[3]
        U="D"
        D="U"
    print(U*p+R*(q+1)+D*(p+1)+L*(q+1)+U+L+U*(p+1)+R*(q+1)+D*(p+1)+L*q)  
X=list(map(int,input().split()))
#X軸に並行
if X[2]-X[0]==0:
    if X[3]-X[1]>0:
        q=X[3]-X[1]
        U="U"
        D="D"
    else:
        q=X[1]-X[3]
        U="U"
        D="D"
    print(U*(q+1)+R*2+D*(q+2)+L*2+U+L+U*q+R*2+D*q+L)
#Y軸に並行
if X[3]-X[1]==0:
    if X[2]-X[0]>0:
        p=X[2]-X[0]
        R="R"
        L="L"
    else:
        p=X[0]-X[2]
        R="L"
        L="R"
    print(R*(p+1)+U*2+L*(p+2)+D*2+R+D+R*p+U*2+L*p+D)
if X[2]-X[0]!=0 and X[3]-X[1]!=0:
    if X[2]-X[0]>0:
        p=X[2]-X[0]
        R="R"
        L="L"
    else:
        p=X[0]-X[2]
        R="L"
        L="R"
    if X[3]-X[1]>0:
        q=X[3]-X[1]
        U="U"
        D="D"
    else:
        q=X[1]-X[3]
        U="D"
        D="U"
    print(U*p+R*(q+1)+D*(p+1)+L*(q+1)+U+L+U*(p+1)+R*(q+1)+D*(p+1)+L*q)  

Fixed submission:
S=input()
print(S.replace(","," "))
Buggy python submission (verdict: Time Limit Exceeded):
K,S=map(int,input().split())
ans=0
for i in range(K+1):
    for j in range(K+1):
        for l in range(K+1):
            if i+j+l==S:
                ans+=1
print(ans)

Fixed submission:
K,S=map(int,input().split())
ans=0
for i in range(K+1):
    for j in range(K+1):
        if 0<=S-i-j<=K:
          ans+=1
print(ans)