Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02681 (python)

Fixed submission:
S = input()
T = input()
flag = 1
for i in range(0,len(T)):
    if not 96<ord(T[i]) and ord(T[i])<122:
        flag=0

if not len(T)-len(S)==1:
    flag=0

if not T[:-1]==S:
    flag=0
print("Yes" if flag==1 else "No")

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
flag = 1
for i in S:
    if not 96<ord(s) and ord(s)<122:
        flag=0

    if T[len(t)-1]:
        flag=0
    if not len(T)-len(S)==1:
        flag=0
    if not T[:-1]==S:
        flag=0
print(Yes if flag==1 else No)
Problem p02993 (python)

Fixed submission:
x = input()
def samenum(string):
  for i in range(3):
    if string[i] == string[i+1]:
        return "Bad"
        quit()
  return "Good"

print(samenum(x))

Buggy submission (verdict: Runtime Error):
x = input()
def samenum(string):
  for i in range(3):
  	if string[i] == string[i+1]:
    	return "Bad"
  		quit()
  return "Good"

print(samenum(x))
Problem p02741 (python)

Fixed submission:
from re import sub
LIST = "1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51"
K = int(input())
print(sub(r"[\s]", "", LIST).split(",")[K-1])

Buggy submission (verdict: Runtime Error):
from re import sub
LIST = "1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51"
K = int(input())
return sub(r"[,\s]", "", LIST)[K-1]

Buggy submission (verdict: Runtime Error):
from re import sub
LIST = "1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51"
K = int(input())
return sub(r"[,\s]", "", LIST)[K+1]
Problem p02742 (python)

Fixed submission:
H, W = map(int, input().split())
from math import ceil
 
if H == 1 or W == 1:
  print(1)
else:
  print(ceil(H*W/2))

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
from math import ceil

if H == 1 or W == 1:
  print(1)
else:
  print(ceil(H*W/2)
Problem p02706 (python)

Fixed submission:
day_num, homework_num = map(int, input().split(" "))

requ_day = list(map(int, input().split()))
sum_day = 0

for day in requ_day:
  sum_day += day
  
activ_day = day_num - sum_day

if activ_day >= 0:
  print(activ_day)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
human_num = int(input())

nyu = list(map(int, input().split(" ")))

for i in range(human_num):
    print(nyu.count(i + 1))
Problem p03000 (python)

Fixed submission:
N,X = [int(x) for x in input().split()]
data_jump = [int(x) for x in input().split()]
count = 1
sum_dis = 0
for i in range(N):
    sum_dis += data_jump[i]
    if sum_dis > X:
        break
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
N,X = [int(x) for x in input().split()]
data_jump = [int(x) for x in input().split()]
count = 1
sum_dis = 0
for i in range(N+1):
    sum_dis += data_jump[i]
    if sum_dis > X:
        break
    count += 1
print(count)
Problem p02687 (python)

Fixed submission:
s = input()
b = "ABC"
r = "ARC"

if s == b:
  print("ARC")
elif s == r:
  print("ABC")

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = set()

for _ in range(k):
  d = int(input())
  while m <= d:
    l = int(input())
    a.append(l)
    m += 1

print(n - len(a))

Buggy submission (verdict: Runtime Error):
s = input()
b = "ABC"
r = "ARC"

if s == b:
  print("ARC")
else if s == r:
  print("ABC")

Buggy submission (verdict: Runtime Error):
s = input()

if s == "ABC":
  print("ARC")
else if s == "ARC":
  print("ABC")

Buggy submission (verdict: Runtime Error):
s = str(input())

if s == "ARC":
  print("ABC")
else if s == "ABC":
  print("ARC")
Problem p02681 (python)

Fixed submission:
a = input()
b = input()
if (len(b)>len(a)) and (a==b[:len(a)]):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
  a = input()
  b = input()
  if (len(b)>len(a)) and (a==b[:len(a)]):
  	print('Yes')
  else:
  	print('No')

Buggy submission (verdict: Runtime Error):
    a = input()
    b = input()
    if len(b)> len(a) and a==b[:len(a)]:
      print('Yes')
    else:
      print('No')
Problem p02687 (python)

Fixed submission:
S = input()
if S =='ABC':
    print('ARC')
else:
    print('ABC')

Buggy submission (verdict: Runtime Error):
S = input()
if S ='ABC':
    print('ARC')
else:
    print('ABC')
Problem p02747 (python)

Fixed submission:

s = input()

if len(s) % 2 ==1:
	print('No')
	exit()

if s == "hi"* (len(s) // 2):
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
s = input()

if s // 2 ==1:
	print('Np')
	exit()

if s == "hi"* (s // 2):
	print('Yes')
else:
	print('No')
Problem p03238 (python)

Fixed submission:
N = int(input(""))

if N == 1:
    print('Hello World')
elif N == 2:
    A = int(input(""))
    B = int(input(""))
    print(A + B)

Buggy submission (verdict: Runtime Error):
N, T = map(int, input().split())
if N < 1 or N > 100:
    exit()
if T < 1 or T > 1000:
    exit()

jugde = False
jugde_N = 100
maplist = {}
for i in range(N):
    ci,ti = map(int, input().split())
    if ci < 1 or ci > 1000:
        exit()
    if ti < 1 or ti > 1000:
        exit()
    if maplist.get(ci) == None:
        maplist[ci] = ti
for jN,jT in maplist.items():
    if jT <= T:
        if jN <= jugde_N:
            jugde = True
            jugde_N = jN
if jugde == False:
    print('TLE')
else:
    print(jugde_N)

Buggy submission (verdict: Runtime Error):
N = int(input(""))

if n == 1:
    print('Hello World')
elif n == 2:
    A= int(input("A"))
    B = int(input("B"))
    print(A + B)
Problem p02743 (python)

Fixed submission:
a, b, c = map(int, input().split())

if c-(a+b) >= 0:
    if 4*a*b < (c-(a+b))**2:
        print('Yes')
    else:
        print('No')
else:
        print('No')

Buggy submission (verdict: Runtime Error):
from math import sqrt

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

if sqrt(a)+sqrt(b)-sqrt(c) < 0:
    print('Yes')
else:
    print('No'
Problem p02801 (python)

Fixed submission:
c = input()
print(chr(ord(c) + 1))

Buggy submission (verdict: Runtime Error):
from collections import deque

def search(h, w, pre_h, pre_w):
    can = []
    if h > 0:
        can.append((h-1, w))
    if h < H-1:
        can.append((h+1, w))
    if w > 0:
        can.append((h, w-1))
    if w < W-1:
        can.append((h, w+1))
    res = []
    for h, w in can:
        if S[h][w]=='.' and (h, w) != (pre_h, pre_w):
            res.append((h, w))
    return res

def bfs(h, w):
    d = [[float('inf') for _ in range(W)] for _ in range(H)]
    d[h][w] = 0
    pre_h, pre_w = h, w
    adj_list = search(h, w, pre_h, pre_w)
    open_list = deque([])
    closed_list = []
    closed_list = set(closed_list)
    for adj in adj_list:
        open_list.append((adj[0], adj[1], pre_h, pre_w))
    cnt = 0
    while True:
        cnt+=1
        if H==20 and W==20:
            if cnt > 2200:
                break
        if len(open_list) == 0:
            break
        h, w, pre_h, pre_w = open_list.popleft()
        closed_list.add((h, w, pre_h, pre_w))
        d[h][w] = min(d[h][w], d[pre_h][pre_w] + 1)
        adj_list = search(h, w, pre_h, pre_w)
        for adj in adj_list:
            if (adj[0], adj[1], h, w) in closed_list:
                continue
            open_list.append((adj[0], adj[1], h, w))

    res = 0
    for h in range(H):
        for w in range(W):
            if not d[h][w] == float('inf'):
                res = max(res, d[h][w])
    return res

def bounday():
    for h in range(H):
        for w in range(W):
            if S[h][w] == '#':
                return False
    return True

H, W = map(int, input().split())
S = []
for i in range(H): 
    S.append(list(input()))

if __name__ == "__main__":

    if bounday():
        print(H+W-2)
        exit(0)

    ans = 0
    for h in range(H):
        for w in range(W):
            if S[h][w] == '#':
                continue
            maxd = bfs(h, w)
            ans = max(maxd, ans)
    print(ans)
Problem p02811 (python)

Fixed submission:
k, x = map(int, input().split())

if k*500 >= x:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
k, x = map(int, input().split())

if k*500 >= x:
    print('Yes')
else:
    print('No'
Problem p02843 (python)

Fixed submission:
x = input()
s = list(x)
x = int(x)

if len(s) < 3:
    print(0)
else:
    xx = int(s[-2]+s[-1])
    num_item = xx//5
    if xx%5 != 0:
        num_item += 1
    
    hun = int(''.join(s[0:-2]))
    if hun < num_item:
        print(0)
    else:
        print(1)

Buggy submission (verdict: Runtime Error):
x = input()
s = list(x)
x = int(x)

xx = int(s[-2]+s[-1])
num_item = xx//5
if xx%5 != 0:
    num_item += 1

hun = int(''.join(s[0:-2]))
if hun < num_item:
    print(0)
else:
    print(1)
Problem p02882 (python)

Fixed submission:
from math import degrees, atan, sqrt, tan

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

if x>a*a*b/2:
    print(degrees(atan(2*(a*a*b-x)/(a**3))))
else:
    print(degrees(atan((a*b*b)/(2*x))))

Buggy submission (verdict: Runtime Error):
from math import degrees, atan, sqrt, tan

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

if x>a*a*b/2:
    print(degrees(atan(2*(a*a*b-x)/(a**3))))
else:
    print(degrees(atan((a*b*b)/(2*x)))
Problem p02888 (python)

Fixed submission:
from bisect import bisect_left
N = int(input())
L = list(map(int, input().split()))
L.sort()
res = 0
for i in range(N):
    for j in range(i+1, N):
        idx = bisect_left(L, L[i]+L[j])
        res += max(0,idx-(j+1))
print(res)

Buggy submission (verdict: Runtime Error):
from bisect import bisect_left
N = int(input())
L = list(map(int, input().split()))
L.sort()
res = 0
for i in range(N-2):
    for j in range(i+1, N-1):
        idx = bisect_left(L[j+1:], L[i]+L[j])
        res += idx
print(res

Buggy submission (verdict: Runtime Error):
from bisect import bisect_left
N = int(input())
L = list(map(int, input().split()))
L = L.sort()
res = 0
for i in range(N-2):
    for j in range(i+1, N-1):
        idx = bisect_left(L[j+1:], L[i]+L[j])
        res += idx
print(res)

Buggy submission (verdict: Runtime Error):
from bisect import bisect_left
N = int(input())
L = list(map(int, input().split())).sort()
res = 0
for i in range(N-2):
    for j in range(i+1, N-1):
        idx = bisect_left(L[j+1:], L[i]+L[j])
        res += idx
print(res)
Problem p02972 (python)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))

M = 0
boxes = [0]*N
for i in reversed(range(N)):
    num_balls = 0
    for k in range(i, N, i+1):
        num_balls += boxes[k]
    if num_balls%2 != a[i]:
        boxes[i] = 1
        M += 1

print(M)
for i in range(N):
    if boxes[i]==1:
        print(i+1)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
a.reverse()

def search(x):
    n = 1
    res = 0
    while True:
        nx = n*x
        if nx > N:
            break
        res += boxes[nx-1]
        n += 1
    return res%2


boxes = [0]*N
for i, ai in enumerate(a):
    i = N-i
    eo = search(i)
    if ai!=eo:
        boxes[i]=1

ans=[]
for i, box in enumerate(boxes):
    if box==1:
        ans.append(i)

if ans==[]:
    print(0)
else:
    print(*ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
a.reverse()

def search(x):
    n = 1
    res = 0
    while True:
        nx = n*x
        if nx >= N:
            break
        res += boxes[nx]
        n += 1
    return res%2


boxes = [0]*N
for i, ai in enumerate(a):
    i = N-i
    eo = search(i)
    if ai!=eo:
        boxes[i]=1

ans=[]
for i, box in enumerate(boxes):
    if box==1:
        ans.append(i)

if ans==[]:
    print(0)
else:
    print(*ans)
Problem p02995 (python)

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

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

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

print(
    b - (b//c) - (b//d) + (b//cd) \
    -((a-1) - ((a-1)//c) - ((a-1)//d) + ((a-1)//cd))
    )

Buggy submission (verdict: Runtime Error):
import math
 
a, b, c, d = list(map(int, input().split()))
 
num_mul_c = 0
num_mul_d = 0
num_mul_cd = 0
 
n=1
while True:
    nc = n*c
    if nc>b:
        break
    if (a<=nc)and(nc<=b):
        num_mul_c += 1
    n += 1
n=1
while True:
    nd = n*d
    if nd>b:
        break
    if (a<=nd)and(nd<=b):
        num_mul_d += 1
    n += 1
n=1
cd = int((c*d)//math.gcd(c, d))
while True:
    ncd = cd*n
    if ncd>b:
        break
    if (a<=ncd)and(ncd<=b):
        num_mul_cd += 1
    n += 1
print(b-a+1 - num_mul_c - num_mul_d + num_mul_cd)

Buggy submission (verdict: Runtime Error):
import math

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

num_mul_c = 0
num_mul_d = 0
num_mul_cd = 0

n=1
while True:
    nc = n*c
    if nc>b:
        break
    if (a<=nc)and(nc<=b):
        num_mul_c += 1
    n += 1
n=1
while True:
    nd = n*d
    if nd>b:
        break
    if (a<=nd)and(nd<=b):
        num_mul_d += 1
    n += 1
n=1
cd = (c*d)//math.gcd(c, d)
while True:
    ncd = cd*n
    if ncd>b:
        break
    if (a<=ncd)and(ncd<=b):
        num_mul_cd += 1
    n += 1
print(b-a+1 - num_mul_c - num_mul_d + num_mul_cd)
Problem p03000 (python)

Fixed submission:
N, X = map(int, input().split())
L = list(map(int, input().split()))

D = 0
cnt = 1
for i in range(N):
    D+=L[i]
    if D>X:
        break
    else:
        cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
N, X = map(int, input().split())
L = list(map(int, input().split()))

D = 0
res = 0
while True:
    if D > X:
        break
    res += 1
    D += L[res-1] 

print(res)
Problem p03061 (python)

Fixed submission:
def gcd(a, b):
    if b > a:
        a, b = b, a
    while b:
        a, b = b, a%b
    return a

def cul(n, x):
    l = len(x)
    b = x
    b.pop(n)
    tmp = b[0]
    for i in range(1, l-1):
        tmp = gcd(tmp, b[i])
    return tmp

import sys
p = 50
N = int(input())
if p>N: p=N
a = list(map(int, input().split()))

ans = 0
for i in range(p):
    s = cul(i, a[:p])
    if s>ans: ans=s

print(ans)

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce

def gcd(numbers):
    return reduce(math.gcd, numbers)

N = int(input())
A = list(map(int, input().split()))

max_gcd = 1
for i in range(N):
    i_gcd =  gcd(A[:(i-1)] + A[i:])
    if max_gcd < i_gcd:
        max_gcd = i_gcd

print(max_gcd)
Problem p03106 (python)

Fixed submission:
a, b, k = map(int, input().split())

if (a, b, k) == (1, 1, 1):
    print(1)
    exit(0)

cnt = 0
for i in range(max(a,b), -1, -1):
    if a%i==0 and b%i==0:
        cnt+=1
    if cnt==k:
        break
print(i)

Buggy submission (verdict: Runtime Error):
a, b, k = map(int, input().split())

if (a, b, k) == (1, 1, 1):
    print(1)
    exit(0)
if k==1:

cnt = 0
for i in range(max(a,b), -1, -1):
    if a%i==0 and b%i==0:
        cnt+=1
    if cnt==k:
        break
print(i)
Problem p03399 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())

ans = min(a+c, a+d, b+c, b+d)
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
d, x = map(int, input().split())
a = list(map(int, [input() for i in range(n)]))

ans = 0

for t in range(1, d+1):
    for ai in a:
        if t%ai == 1:
            ans += 1

print(ans+x)

Buggy submission (verdict: Runtime Error):
n = int(input())
d, x = map(int, input().split())
a = list(map(int, [input() for i in range(n)]))

ans = 0

for t in range(1, d+1):
    for ai in a:
        if t%ai == 1:
            ans += 1

print(ans+x)
Problem p03846 (python)

Fixed submission:
from collections import defaultdict

def possible():
    if N%2==0:
        for cnt in cnt_dict.values():
            if cnt != 2:
                return False
        return True
    else:
        for i, cnt in enumerate(cnt_dict.values()):
            if i==0:
                if cnt != 1:
                    return False
            else:
                if cnt != 2:
                    return False
        return True

N = int(input())
A = list(map(int, input().split()))
num = N//2

cnt_dict = defaultdict(list)

if N%2==0:
    for i in range(1, N, 2):
        cnt_dict[i] = 0
else:
    for i in range(0, N, 2):
        cnt_dict[i] = 0
for a in A:
    if not(a in cnt_dict.keys()):
        flag=False
    else:
        cnt_dict[a]+=1
        flag=True

if __name__ == "__main__":    

    if possible() and flag:
        mod = 10**9+7
        res = 1
        for i in range(1, num+1):
            res = res*2%mod
        print(res)
    else:
        print(0)

Buggy submission (verdict: Runtime Error):
from collections import defaultdict

def possible():
    if N%2==0:
        for cnt in cnt_dict.values():
            if cnt != 2:
                return False
        return True
    else:
        for i, cnt in enumerate(cnt_dict.values()):
            if i==0:
                if cnt != 1:
                    return False
            else:
                if cnt != 2:
                    return False
        return True

N = int(input())
A = list(map(int, input().split()))
num = N//2

cnt_dict = defaultdict(list)

if N%2==0:
    for i in range(1, N, 2):
        cnt_dict[i] = 0
else:
    for i in range(0, N, 2):
        cnt_dict[i] = 0
for a in A:
    cnt_dict[a]+=1

if __name__ == "__main__":    

    if possible():
        mod = 10**9+7
        res = 1
        for i in range(1, num+1):
            res = res*2%mod
        print(res)
    else:
        print(0)
Problem p02702 (python)

Fixed submission:
s=input()
n=len(s)
mod=2019
d=0
p=1
ml=[0]*mod
for i in range(1,n+1):
  k=int(s[-i])
  d+=p*k
  d%=mod
  ml[d]+=1
  p*=10
  p%=mod
ans=0
for i in ml:
  ans+=i*(i-1)//2
print(ans+ml[0])

Buggy submission (verdict: Runtime Error):
S = str(input())
ans = set()

def dfs(i, j):
    if int(S[i:j+1])%2019 == 0:
        ans.add((i, j))
    if j == len(S)-1:
        return

    dfs(i, j+1)
    dfs(i+1, j+1)

if len(S) < 4:
    print(0)

else:
    dfs(0, 3)
    if not ans:
        print(0)
    else:    
        print(len(ans))

Buggy submission (verdict: Runtime Error):
S = str(input())
ans = set()

def dfs(i, j):
    if int(S[i:j+1])%2019 == 0:
        ans.add((i, j))
    if j == len(S)-1:
        return

    dfs(i, j+1)
    dfs(i+1, j+1)

if len(S) < 4:
    print(0)

else:
    dfs(0, 3)
    print(len(ans))
Problem p02706 (python)

Fixed submission:
n, m = map(int, input().split())
A = list(map(int, input().split()))

total = sum(A)
if total > n:
    print(-1)
else:
    print(n-total)

Buggy submission (verdict: Runtime Error):
/usr/local/bin/python3.8 /Users/tmohiro/Desktop/Atcoder/ABC163/B.py
314 15
9 26 5 35 8 9 79 3 23 8 46 2 6 43 3
9

Process finished with exit code 0
Problem p02727 (python)

Fixed submission:
X, Y, A, B, C = map(int, input().split())
r = list(map(int, input().split()))
g = list(map(int, input().split()))
nc = list(map(int, input().split()))

r.sort(reverse=True)
g.sort(reverse=True)
nc.sort(reverse=True)

selected = r[:X] + g[:Y]
selected.sort()

if len(selected) > len(nc) or len(selected) == len(nc):
  L = len(nc)
else:
  L = len(selected)

for i in range(L):
  if selected[i] < nc[i]:
    selected[i] = nc[i]
    
print(sum(selected))

Buggy submission (verdict: Runtime Error):
X, Y, A, B, C = map(int, input().split())
r = list(map(int, input().split()))
g = list(map(int, input().split()))
nc = list(map(int, input().split()))

r.sort(reverse=True)
g.sort(reverse=True)
nc.sort(reverse=True)

selected = r[:X] + g[:Y]
selected.sort()

for i in range(X+Y):
  if selected[i] < nc[i]:
    selected[i] = nc[i]
    
print(sum(selected))

Buggy submission (verdict: Runtime Error):
X, Y, A, B, C = map(int, input().split())
r = list(map(int, input().split()))
g = list(map(int, input().split()))
nc = list(map(int, input().split()))

r.sort(reverse=True)
g.sort(reverse=True)
nc.sort(reverse=True)

selected = r[:X] + g[:Y]
selected.sort()

for i in range(C):
  if selected[i] < nc[i]:
    selected[i] = nc[i]
    
print(sum(selected))
Problem p02885 (python)

Fixed submission:
A, B = map(int, input().split())
C = A - B*2

if C >= 0:
  print(C)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input())
C = A - B*2

if C >= 0:
  print(C)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
A, B = int(input())

if A - B*2 <= 0:
  print(0)
else:
  print(A - B*2)
Problem p03243 (python)

Fixed submission:
# 入力
N=int(input())

while True:
  # 1種類の文字しか使われない場合が答え
  if len(set(str(N)))==1:
    print(N)
    break

  # 次の数へ
  N+=1

Buggy submission (verdict: Runtime Error):
N = int(input())

if N < 111:
  print(111)
elif N < 222:
  print(222)
elif N < 333:
  print(333)
elif N < 444:
  print(444)
elif N < 555:
  print(555)
elif N < 666:
  print(666)
elif N < 777:
  print(777)
elif N < 888:
  print(888)
elif N =< 999:
  print(999)
Problem p03251 (python)

Fixed submission:
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
x.append(X)
y.append(Y)

if max(x) < min(y):
  print('No War')
else:
  print('War')

Buggy submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))

if max(x) < min(y)
  print('No War')
else:
  print('War')
Problem p03434 (python)

Fixed submission:
N = int(input())
score = list(map(int, input().split()))
A = 0
B = 0
 
score.sort(reverse=True)
for i in range(N):
  if i % 2 == 0:
    A += score[i]
  else:
    B += score[i]

print(A-B)

Buggy submission (verdict: Runtime Error):
n = input()
a = list(map(int, input().split()))
A = 0
B = 0

a.sort(reverse=True)

for i in range(n):
  if i % 2 == 0:
    A += a[i]
  else:
    B += a[i]
    
print(A-B)

Buggy submission (verdict: Runtime Error):
N = int(input())
score = list(map(int, input().split()))
total = 0
 
score.reverse()
for i in range(0, N, 2):
  if i == N:
    total = total + score[i]
  else:
    total = total + (score[i]-score[i+1])
 
print(total)

Buggy submission (verdict: Runtime Error):
N = int(input())
score = list(map(int, input().split()))
total = 0
 
score.sort(reverse=True)
for i in range(0, N, 2):
  if i == N:
    total = total + score[i]
  else:
    total = total + (score[i]-score[i+1])

print(total)

Buggy submission (verdict: Runtime Error):
N = int(input())
score = list(map(int, input().split()))
total = 0
 
score.sort(reverse=True)
for i in range(0, N, 2):
  if score[i+1] == None:
    total += score[i]
  else:
    total += score[i]-score[i+1]

print(total)

Buggy submission (verdict: Runtime Error):
N = int(input())
score = list(map(int, input().split()))
total = 0
 
score.sort(reverse=True)
for i in range(N):
  if score[i+1] == None:
    total += score[i]
  else:
    total += score[i]-score[i+1]
 
print(total

Buggy submission (verdict: Runtime Error):
N = int(input())
score = [0]*N
score = map(int, input().split())
total = 0

score.sort(reverse=True)
for i in range(N):
  if score[i+1] == None:
    total += score[i]
  else:
    total += score[i]-score[i+1]

print(total)
Problem p03473 (python)

Fixed submission:
M = int(input())
x = 48 - M

print(x)

Buggy submission (verdict: Runtime Error):
t = int(input())
x = 48 - t

return x

Buggy submission (verdict: Runtime Error):
t = int(input())

return 48-t