Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N,M,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
p = x.append(X)
q = y.append(Y)
if min(q) >= max(p):
  print("No War")
else:
  print("War")

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 min(y) >= max(x)+1:
  print("No War")
else:
  print("War")

Buggy python submission (verdict: Runtime Error):
N,M,X,Y = map(int,input().split())
x = list(map(int,input().split() for i in range(N)))
y = list(map(int,input().split() for i in range(N)))
if min(y)-max(x) < 1:
  print("War")
else:
  print("No War")


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 min(y) >= max(x)+1:
  print("No War")
else:
  print("War")
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
A,B = map(int, input().split())
if (A = 2) or (B = 2):
  print("Yes")
else:
  print("No")

Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
A,B = map(int, input().split())
if (A == 2) or (B == 2):
  print("No")
else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
if (A = 2) or (B = 2):
  print("Yes")
else:
  print("No")


Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
A,B = map(int, input().split())
if (A == 2) or (B == 2):
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
a = [input() for i in range(N)]
for i in range(N):
  if a[i][len(a[i])]==a[i+1][0]:
    continue
  else:
    break
    print("No")
print("Yes")

Fixed submission:
N = int(input())
W = []
for i in range(N):
    W.append(str(input()))
ans = "No"
startwith = []
endwith = []
if len(set(W)) == len(W):
   for i in W:
       startwith.append(i[0])
       endwith.append(i[-1])
   startwith.pop(0)
   endwith.pop(-1)
   if startwith == endwith:
    ans = "Yes"

print(ans)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
a = [input() for i in range(N)]
for i in range(N):
  if a[i][len(a[i])]=a[i+1][0]:
    continue
  else:
    break
    print("No")
print("Yes")
    

Fixed submission:
N = int(input())
W = []
for i in range(N):
    W.append(str(input()))
ans = "No"
startwith = []
endwith = []
if len(set(W)) == len(W):
   for i in W:
       startwith.append(i[0])
       endwith.append(i[-1])
   startwith.pop(0)
   endwith.pop(-1)
   if startwith == endwith:
    ans = "Yes"

print(ans)
Buggy python submission (verdict: Runtime Error):
import math

N,X = map(int,input().split())
x = list(map(int,input().split()))

x.append(X)

xsub = []

if N >= 2:
    for i in range(N-1):
         xsub.append(x[i+1]-x[i])

    A = []

    for i in range(N-2):
         A.append(math.gcd(xsub[i+1],xsub[i]))

    print(min(A))

else:
    print(abs(x[0]-X))

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

x.sort()

def gcd(x,y):
    X = max(x,y)
    Y = min(x,y)
    if Y == 0:
        return X
    else:
        return gcd(Y,X%Y)

keepgcd = 0
maxgcd = 10**9

if N >= 2:
   for i in range(N-1):
       keepgcd = gcd(abs(X-x[i+1]),abs(X-x[i]))
       if maxgcd > keepgcd:
          maxgcd = keepgcd
   print(maxgcd)
else:
    print(max(x[0],X)-min(x[0],X))

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

x.append(X)

xsub = []

if N >= 2:
    for i in range(N-1):
         xsub.append(x[i+1]-x[i])

else:
    print(abs(x[0]-X))

import math

A = []

for i in range(N-2):
    A.append(math.gcd(xsub[i+1],xsub[i]))

print(min(A))

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

x.sort()

def gcd(x,y):
    X = max(x,y)
    Y = min(x,y)
    if Y == 0:
        return X
    else:
        return gcd(Y,X%Y)

keepgcd = 0
maxgcd = 10**9

if N >= 2:
   for i in range(N-1):
       keepgcd = gcd(abs(X-x[i+1]),abs(X-x[i]))
       if maxgcd > keepgcd:
          maxgcd = keepgcd
   print(maxgcd)
else:
    print(max(x[0],X)-min(x[0],X))

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

x.append(X)

xsub = []

if N >= 2:
    for i in range(N-1):
         xsub.append(x[i+1]-x[i])

else:
    print(abs(x[0]-X))

import sympy

A = []

for i in range(N-2):
    A.append(sympy.gcd(xsub[i+1],xsub[i]))

print(min(A))

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

x.sort()

def gcd(x,y):
    X = max(x,y)
    Y = min(x,y)
    if Y == 0:
        return X
    else:
        return gcd(Y,X%Y)

keepgcd = 0
maxgcd = 10**9

if N >= 2:
   for i in range(N-1):
       keepgcd = gcd(abs(X-x[i+1]),abs(X-x[i]))
       if maxgcd > keepgcd:
          maxgcd = keepgcd
   print(maxgcd)
else:
    print(max(x[0],X)-min(x[0],X))
Buggy python submission (verdict: Runtime Error):
x1,x2,y1,y2 = map(int,input().split())
x3 = x2 + (y1 - y2)
y3 = y2 + (x2 - x1)
x4 = y1 + (x2 - x1)
y4 = x1 + (y1 - y2)
print(x3,y3,x4,y4)

Fixed submission:
# -*- coding: utf-8 -*-
K = int(input())
if K % 2 == 0:
  print((K//2)*(K//2))
elif K % 2 == 1:
  print(((K+1)//2)*((K-1)//2))

Buggy python submission (verdict: Runtime Error):
x1,y1,x2,y2 = map(int,input().split())
x3 = y1 - y2
y3 = abs(x1 - x2)
x4 = abs(y2 - y3)
y4 = abs(x2 - x3)
print(x3,y3,x4,y4)

Fixed submission:
# -*- coding: utf-8 -*-
K = int(input())
if K % 2 == 0:
  print((K//2)*(K//2))
elif K % 2 == 1:
  print(((K+1)//2)*((K-1)//2))
Buggy python submission (verdict: Runtime Error):
x1,x2,y1,y2 = map(int,input())
x3 = x2 + (y1 - y2)
y3 = y2 + (x2 - x1)
x4 = y1 + (x2 - x1)
y4 = x1 + (y1 - y2)
print(x3,y3,x4,y4)

Fixed submission:
x1,y1,x2,y2 = map(int,input().split())
x3 = x2 + (y1 - y2)
y3 = y2 + (x2 - x1)
x4 = x1 + (y1 - y2)
y4 = y1 + (x2 - x1)
print(x3,y3,x4,y4)
Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().aplir())
print((A-1)*(B-1))

Fixed submission:
# -*-  coding: utf-8 -*-
n,m=map(int,input().split())
print("{}".format((n-1)*(m-1)))

Buggy python submission (verdict: Runtime Error):
S = input()
K = int(input())
L = [int(i) for i in S]
count = 1
for i in L:
    if i != 1:
        if count <= K:
            print(i)
        else:
            print(1)
        exit()
    else:
        count += 1
print(1)

Fixed submission:
# -*-  coding: utf-8 -*-
n,m=map(int,input().split())
print("{}".format((n-1)*(m-1)))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
b = []
def f(n):
  for i in range[N+1]:
    a = [] #約数の個数を入れていくリスト
    while n>1:
      if n // i == 0:
      a.append(1) #リストに1を追加
      i = i+1
      else:
      i = i+1:continue
        
while N>1:
  f(N) #関数の実行
  if sum(a) == 8:
  b.append(1)#条件を満たす数をリストイン
  a.clear()
  N = N-1
  else:
  N = N-1

print(sum(b))
      

Fixed submission:
N = int(input())
if N < 105:
  print(0)
elif 105 <= N < 135:
  print(1)
elif 135 <= N < 165:
  print(2)
elif 165 <= N < 189:
  print(3)
elif 189 <= N < 195:
  print(4)
else:
  print(5)
Buggy python submission (verdict: Runtime Error):
import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush,heapify
from fractions import gcd
from copy import deepcopy
import math
import queue
import numpy as np
#import sympy as syp(素因数分解とか)
Mod = 1000000007
import sys
sys.setrecursionlimit(100000) 
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)

def main(): #startline-------------------------------------------
    a,b = map(int,input().split())
    if a+b == 15:
        print("+")
    elif a*b == 15:
        print("*")
    else:
        print("x")
if __name__ == "__main__":
    main() #endline===============================================

Fixed submission:
a,b = map(int,input().split())
if a+b == 15:
        print("+")
elif a*b == 15:
        print("*")
else:
        print("x")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B,C,D=map(str,input().split())
+ = "1"
- = "-1"
L = [+,-]
S = map(int,L.split())
print("{}".format(A+B+C+D))

Fixed submission:
# -*- coding: utf-8 -*-
S = str(input())
P = S.count("+")
Q = S.count("-")
print("{}".format(P-Q))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B,C,D=map(int,input().split())
+ = 1
- = -1
print("{}".format(A+B+C+D))

Fixed submission:
# -*- coding: utf-8 -*-
S = str(input())
P = S.count("+")
Q = S.count("-")
print("{}".format(P-Q))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
S = str(input())
L = []
for i in range(len(S)):
  L.append(S[i])
M = sum(L)
if int(S) % M == 0:
  print("Yes")
else:
  print("No")

Fixed submission:
# -*- coding: utf-8 -*-
S = str(input())
L = []
for i in range(len(S)):
  L.append(int(S[i]))
M = sum(L)
if int(S) % M == 0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B=map(int,input().split())
if A <= 8 and B <= 8:
  print(Yay!)
else:
  print(:()

Fixed submission:
# -*- coding: utf-8 -*-
A,B =map(int,input().split())
if A <= 8 and B <= 8:
  print("Yay!")
else:
  print(":(")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B=map(int,input().split)
if A <= 8 and B <= 8:
  print("Yay!")
else:
  print(":(")

Fixed submission:
# -*- coding: utf-8 -*-
A,B =map(int,input().split())
if A <= 8 and B <= 8:
  print("Yay!")
else:
  print(":(")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B=map(int,input().split)
if A <= 8 and B <= 8:
  print(Yay!)
else:
  print(:()

Fixed submission:
# -*- coding: utf-8 -*-
A,B =map(int,input().split())
if A <= 8 and B <= 8:
  print("Yay!")
else:
  print(":(")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
if N > 1000:
  print(ABD)
else:
  print(ABC)

Fixed submission:
# -*- coding: utf-8 -*-
N = int(input())
if N >=  1000:
  print("ABD")
else:
  print("ABC")
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = str(input())

for i in range(len(S)):
    a = []
    S_former = S[:i]
    S_latter = S[i:]
    for sub1 in S_former:
        if sub1 in S_latter:
           a.append(1)
           S_former.replace(sub1,"")
    b = sum(a)

print(max(b))

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

A = []

for i in range(1,N+1):
    ans = 0
    X = S[:i]
    Y = S[i:len(S)+1]
    L = []
    M = []
    for j in range(len(X)):
        L.append(X[j])
    for k in range(len(Y)):
        M.append(Y[k])
    LS = set(L)
    for l in LS:
         if l in M:
            ans += 1

    A.append(ans)

print(max(A))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()

SL = []
TL = []
for i in range(len(S)):
    SL.append(S[i])
    TL.append(S[i])

A = []

for i in range(len(SL)):
    for j in range(len(SL)):
        if j < i:
            TL[j] = "E"
        elif j > i:
            TL[j] = "W"
    count = 0
    for k in range(len(S)):
        if TL[k] != SL[k]:
            count += 1
    A.append(count)

print(min(A))

Fixed submission:
N = int(input())
S = input()
W_count = 0
W_cumulative = []
for i in range(N):
    if S[i] == "W":
        W_count += 1
    W_cumulative.append(W_count)

ans = N
W_cumulative.insert(0,0)
for i in range(1,N+1):
    count = W_cumulative[i-1]
    count += N - W_cumulative[-1] - i + W_cumulative[i]
    ans = min(ans,count)

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()

SL = []
TL = []
for i in range(len(S)):
    SL.append(S[i])
    TL.append(S[i])

A = []

for i in range(len(SL)):
    for j in range(len(SL)):
        if j < i:
            TL[j] = "E"
        elif j > i:
            TL[j] = "W"
    count = 0
    for k in range(len(S)):
        if TL[k] != SL[k]:
            count += 1
    A.append(count)

print(min(A))

Fixed submission:
N = int(input())
S = input()
W_count = 0
W_cumulative = []
for i in range(N):
    if S[i] == "W":
        W_count += 1
    W_cumulative.append(W_count)

ans = N
W_cumulative.insert(0,0)
for i in range(1,N+1):
    count = W_cumulative[i-1]
    count += N - W_cumulative[-1] - i + W_cumulative[i]
    ans = min(ans,count)

print(ans)

Buggy python submission (verdict: Runtime Error):
8
WWWWWEEE

Fixed submission:
N = int(input())
S = input()
W_count = 0
W_cumulative = []
for i in range(N):
    if S[i] == "W":
        W_count += 1
    W_cumulative.append(W_count)

ans = N
W_cumulative.insert(0,0)
for i in range(1,N+1):
    count = W_cumulative[i-1]
    count += N - W_cumulative[-1] - i + W_cumulative[i]
    ans = min(ans,count)

print(ans)
Buggy python submission (verdict: Runtime Error):
# -*- coding; utd-8 -*-
X = int(input())
import math
a = [math.pow(i,j) for j in range(2,10) for i in range(1,32) if math.pow(i,j)<X]
print(int(max(a)))

Fixed submission:
# -*- coding; utd-8 -*-
X = int(input())
import math
a = [math.pow(i,j) for j in range(2,11) for i in range(1,32) if math.pow(i,j)<=X]
print(int(max(a)))

Buggy python submission (verdict: Runtime Error):
# -*- coding; utd-8 -*-
X = int(input())
import math
a = []
for i in range(1,32):
  a = [math.pow(i,j) for j in range(2,10) if math.pow(i,j)<X]
print(max(a))  

Fixed submission:
# -*- coding; utd-8 -*-
X = int(input())
import math
a = [math.pow(i,j) for j in range(2,11) for i in range(1,32) if math.pow(i,j)<=X]
print(int(max(a)))

Buggy python submission (verdict: Runtime Error):
# -*- coding utf-8 -*-
X = int(input())
a = []
for i in range(11):
  a.append(j ** i for j in range(j ** i < 1000) if X > j**i)
b = []
for i in range(11;32):
  b.append(i ** 2 if X > i ** 2)
L = a+b
print(sum(L))

Fixed submission:
# -*- coding; utd-8 -*-
X = int(input())
import math
a = [math.pow(i,j) for j in range(2,11) for i in range(1,32) if math.pow(i,j)<=X]
print(int(max(a)))
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
K = int(input())
n = len(s)
A = []
for i in range(n):
    for j in range(n-i): 
           A.append(s[i:j+i+1])

B = set(A)
C = []
for i in B:
    C.append(i)
C.sort()
print(C[K-1])

Fixed submission:
s = input()
K = int(input())
n = len(s)
A = []
for i in range(n):
    if n < K:
       for j in range(n-i): 
           A.append(s[i:j+i+1])
    else:
       for j in range(K):
           A.append(s[i:i+j+1])
B = set(A)
C = []
for i in B:
    C.append(i)
C.sort()
print(C[K-1])
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A,B,C = int(input())
K = int(input())
S = max(A,B,C) #入力された整数の最大のものを選ぶ
L = [A,B,C] #入力された整数のリスト化
L.remove(S)
L = sum(L + S)

Fixed submission:
# -*- coding: utf-8 -*-
A,B,C=map(int,input().split())
K = int(input())
S = max(A,B,C) #入力された整数の最大のものを選ぶ
L = [A,B,C] #入力された整数のリスト化
L.remove(S)
P = sum(L , S*2**K)
print(P)
Buggy python submission (verdict: Runtime Error):
import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
import math
import queue
#import numpy as np
#import sympy as syp(素因数分解とか)
Mod = 1000000007
import sys

sys.setrecursionlimit(100000) 
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

def factorial(i):
    if i == 1:
        return 1
    else:
        return i*factorial(i-1)
 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)




def main(): #startline--------------------------------------------
    n,c = map(int,input().split())
    xv = [list(map(int,input().split())) for i in range(n)]
    x = [xv[i][0] for i in range(n)]
    v = [xv[i][1] for i in range(n)]
    r1,r2,l1,l2 = [0]*(n+1),[0]*(n+1),[0]*(n+1),[0]*(n+1)
    ans = 0
    dis = 0
    for i in range(n):
        r1[i+1] = r1[i]+v[i]-(x[i]-dis)
        r2[i+1] = r2[i]+v[i]-2*(x[i]-dis)
        dis = x[i]
    dis = c
    for i in reversed(range(n)):
        l1[n-i] = l1[n-i-1]+v[i]-(dis-x[i])
        l2[n-i] = l1[n-i-1]+v[i]-2*(dis-x[i])
        dis = x[i]
    for i in range(n):
        l1[i+1] = max(l1[i+1],l1[i])
        r1[i+1] = max(r1[i+1],r1[i])
    for i in range(n+1):
        ans = max(ans,max(r2[i]+l1[n-i],l2[i]+r1[n-i]))
    print(ans)
if __name__ == "__main__":
    main() #endline===============================================
    

Fixed submission:
# -*- coding: utf-8 -*-
S = str(input())
T = S.count("o")
print("{}".format(700 + 100 * T))

Buggy python submission (verdict: Runtime Error):
S = str(input())
o=100
x=0
T = 700 + S
print(T)

Fixed submission:
# -*- coding: utf-8 -*-
S = str(input())
T = S.count("o")
print("{}".format(700 + 100 * T))
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
N,M,X = map(int,input().split()) #整数の入力
a = list(map(int,input().split()))
#検問所の入力
b=[]
c=[]
for i in range(X+1,N): #X+1からNの範囲の整数について 
  if i in a: #ある整数が検問所の整数として存在する
    b.append(1)
for i in range(1,X): #1からX-1の範囲の整数について
  if i in a: #ある整数が検問所の整数として存在する
    c.append(1)
print(min(sum(b),sum(c)))

Fixed submission:
# -*- coding: utf-8 -*-
A,B,X= map(int,input().split())
if A + B >= X and X >= A:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
N,M,X = map(int,input().split()) #整数の入力
a = list(map(int,input().split()))
#検問所の入力
b=[]
c=[]
for i in range(X+1,N): #X+1からNの範囲の整数について 
  if i in a: #ある整数が検問所の整数として存在する
    b.append(1)
for i in range(1,X): #1からX-1の範囲の整数について
  if i in a: #ある整数が検問所の整数として存在する
    c.append(1)
print(min(sum(b),sum(c))

Fixed submission:
# -*- coding: utf-8 -*-
A,B,X= map(int,input().split())
if A + B >= X and X >= A:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
X = list(map(int,input().split()))
for i in range(N):
    Xi = X[i]
    X.pop(i)
    Xs = sorted(X)
    print(Xs[(N-1)//2])
    X.insert(i,Xi)

Fixed submission:
N = int(input())
X = list(map(int,input().split()))
XL = sorted(X)
for i in range(N):
    if X[i] <= XL[N//2-1]:
        print(XL[(N+1)//2])
    else:
        print(XL[(N-1)//2])
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))

comb1 = max(a)
comb2 = comb1//2
a.sort()
p = 0
keep = float("inf")
for i in range(n):
    if abs(a[i] - comb2) <= keep:
        p = a[i]
        keep = abs(a[i]-comb2)

def factorial(i):
    if i == 0:
        return 1
    else:
        return factorial(i-1)*i
ans = factorial(comb1)//((factorial(p))*(factorial(comb1-p)))
if comb1 == p:
    print(comb1,0)
else:
    print(comb1,p)

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

comb1 = max(a)
comb2 = comb1//2
a.sort()
p = 0
keep = float("inf")
for i in range(n):
    if abs(a[i] - comb2) <= keep:
        p = a[i]
        keep = abs(a[i]-comb2)

if comb1 == p:
    print(comb1,0)
else:
    print(comb1,p)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))

comb1 = max(a)
comb2 = comb1//2
a.sort()
p = 0
keep = float("inf")
for i in range(n):
    if abs(a[i] - comb2) <= keep:
        p = a[i]
        keep = abs(a[i]-comb2)
import math
ans = math.factorial(comb1)//((math.factorial(p))*(math.factorial(comb1-p)))
if comb1 == p:
    print(comb1,0)
else:
    print(comb1,p)

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

comb1 = max(a)
comb2 = comb1//2
a.sort()
p = 0
keep = float("inf")
for i in range(n):
    if abs(a[i] - comb2) <= keep:
        p = a[i]
        keep = abs(a[i]-comb2)

if comb1 == p:
    print(comb1,0)
else:
    print(comb1,p)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
if N > 3:
  print("{}".format(int(N // 3) + 1)
elif N <= 3:
        print(0)

Fixed submission:
# -*- coding: utf-8 -*-
N = int(input())
if N <= 2:
  print(0)
else:
  print(int(N // 3))
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = list(map(int,input().split()))
if S.count("Y") == 0:
  print("Three")
else:
  print("Four")

Fixed submission:
N = int(input())
S = list(map(str,input().split()))
if S.count("Y") == 0:
  print("Three")
else:
  print("Four")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
a = []
for i in range(1,N+1):
  a.append(input())
if a.count("Y") == 0:
  print("Three")
else:
  print("Four")

Fixed submission:
N = int(input())
S = list(map(str,input().split()))
if S.count("Y") == 0:
  print("Three")
else:
  print("Four")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
a = []
for i in range(1,N+1):
  a.append(input())
  
if a.count("Y") == 0:
  print("Three")
else:
  print("Four")

Fixed submission:
N = int(input())
S = list(map(str,input().split()))
if S.count("Y") == 0:
  print("Three")
else:
  print("Four")

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = [input() for i in range(1:N)]
if a.count("Y") == 0:
  print("Three")
else:
  print("Four")

Fixed submission:
N = int(input())
S = list(map(str,input().split()))
if S.count("Y") == 0:
  print("Three")
else:
  print("Four")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a,b = map(str,input().split())#文字の入力
import math
S = math.sqrt(int("a"+"b")
if S == int(S):
  print("Yes")
else:
  print("No")

Fixed submission:
# -*- coding: utf-8 -*-
a,b = map(str,input().split())#文字の入力
import math
S = math.sqrt(int(a+b))
if S == int(S):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N = int,input()
a = [int(input()) for i in range(N)]
li_uniq = list(set(a))
print(len(li_uniq))

Fixed submission:
N = int(input())
a = [int(input()) for i in range(N)]
li_uniq = list(set(a))
print(len(li_uniq))