Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
S = input().replace("/", "")
print("Heisei" if S <= 20190430 else "TBD")

Fixed submission:
S = int(input().replace("/", ""))
print("Heisei" if S <= 20190430 else "TBD")

Buggy python submission (verdict: Runtime Error):
S = map(int, input().replace("/", ""))
print("Heisei" if S <= S else "TBD")

Fixed submission:
S = int(input().replace("/", ""))
print("Heisei" if S <= 20190430 else "TBD")
Buggy python submission (verdict: Runtime Error):
N = int(input())
sum=0
for i in range(N):
    x, u = input().split()
    if u == "JPY":
        sum+=int(x)
    else:
        sum+=int(x)*380000
print(sum)

Fixed submission:
N = int(input())
sum=0
for i in range(N):
    x, u = list(map(str, input().split()))
    if u == "JPY":
        sum+=int(x)
    else:
        sum+=float(x)*380000
print(sum)

Buggy python submission (verdict: Runtime Error):
N = int(input())
sum=0
for i in range(N):
    x, u = input().split()
    if x == "JPY":
        sum+=int(x)
    else:
        sum+=int(x)*380000
print(sum)

Fixed submission:
N = int(input())
sum=0
for i in range(N):
    x, u = list(map(str, input().split()))
    if u == "JPY":
        sum+=int(x)
    else:
        sum+=float(x)*380000
print(sum)

Buggy python submission (verdict: Runtime Error):
N = int(input())
sum=0
for i in range(N):
    x, u = map(input().split())
    if x == "JPY":
        sum+=int(x)
    else:
        sum+=int(x)*380000
print(sum)

Fixed submission:
N = int(input())
sum=0
for i in range(N):
    x, u = list(map(str, input().split()))
    if u == "JPY":
        sum+=int(x)
    else:
        sum+=float(x)*380000
print(sum)

Buggy python submission (verdict: Runtime Error):
N = int(input())
d={}
for i in range(N):
    x, u = map(input().split())
    d[u]=int(x)
print(sum(d["JPY"])+sum(d["BTC"])*380000)

Fixed submission:
N = int(input())
sum=0
for i in range(N):
    x, u = list(map(str, input().split()))
    if u == "JPY":
        sum+=int(x)
    else:
        sum+=float(x)*380000
print(sum)

Buggy python submission (verdict: Runtime Error):
N = int(input())
d={}
for i in range(N):
    x, u = map(int, input().split())
    d[u]=x
print(sum(d["JPY"])+sum(d["BTC"])*380000)

Fixed submission:
N = int(input())
sum=0
for i in range(N):
    x, u = list(map(str, input().split()))
    if u == "JPY":
        sum+=int(x)
    else:
        sum+=float(x)*380000
print(sum)

Buggy python submission (verdict: Runtime Error):
N = int(input())
for i in range(N):
    x, u = list(map(str, input().split()))
    if u == "JPY":
        sum+=int(x)
    else:
        sum+=float(x)*380000
print(float(sum))

Fixed submission:
N = int(input())
sum=0
for i in range(N):
    x, u = list(map(str, input().split()))
    if u == "JPY":
        sum+=int(x)
    else:
        sum+=float(x)*380000
print(sum)

Buggy python submission (verdict: Runtime Error):
N = int(input())
for i in range(N):
    x, u = list(map(str, input().split()))
    if u == "JPY":
        sum+=int(x)
    else:
        sum+=float(x)*380000
print(sum)

Fixed submission:
N = int(input())
sum=0
for i in range(N):
    x, u = list(map(str, input().split()))
    if u == "JPY":
        sum+=int(x)
    else:
        sum+=float(x)*380000
print(sum)
Buggy python submission (verdict: Runtime Error):
import bisect
A, B, Q = map(int, input().split())

a=[-float("inf")]
b=[-float("inf")]
for i in range(A):
    a.append(int(input()))
for i in range(B):
    b.append(int(input()))   
a+=[float("inf")]
b+=[float("inf")]

for i in range(Q):
    q = int(input())
    x = bisect.bisect_left(a, q[i])
    y = bisect.bisect_left(b, q[i])
    for j in [a[x-1], a[x]]:
        for k in [b[y-1], b[y]]:
            ans1 = abs(j-q)+abs(j-k)
            ans2 = abs(k-q)+abs(j-k)
            ans = min(ans, ans1, ans2)
    print(ans)

Fixed submission:
import bisect
A, B, Q = map(int, input().split())

a=[-float("inf")]
b=[-float("inf")]
for i in range(A):
    a.append(int(input()))
for i in range(B):
    b.append(int(input()))   
a+=[float("inf")]
b+=[float("inf")]

for i in range(Q):
    q = int(input())
    x = bisect.bisect_left(a, q)
    y = bisect.bisect_left(b, q)
    ans = float("inf")
    for j in [a[x-1], a[x]]:
        for k in [b[y-1], b[y]]:
            ans1 = abs(j-q)+abs(j-k)
            ans2 = abs(k-q)+abs(j-k)
            ans = min(ans, ans1, ans2)
    print(ans)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
list=[]
s=[]
if N == 1:
    a, *b=map(int, input().split())
    print(a)
else:
    for i in range(N):
        list.append(input().split())
        s &= set(list[1:])
        list=[]
    print(len(s)) 

Fixed submission:
N, M = map(int, input().split())
list=[]
s=set(range(1, M+1))
for i in range(N):
    K, *A = map(int, input().split())
    s &= set(A)
print(len(s))

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
list=[]
s=[]
if N = 1:
    print(len(input())-1)
else:
    for i in range(N):
        list.append(input().split())
        s = set(s) & set(list[1:])
        list=[]
    print(len(s)) 

Fixed submission:
N, M = map(int, input().split())
list=[]
s=set(range(1, M+1))
for i in range(N):
    K, *A = map(int, input().split())
    s &= set(A)
print(len(s))

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
list=[]
s={}
for i in range(N):
    list.append(input().split())
    a = set(list[1:])
    s = s & a
    list=[]
print(len(s)) 

Fixed submission:
N, M = map(int, input().split())
list=[]
s=set(range(1, M+1))
for i in range(N):
    K, *A = map(int, input().split())
    s &= set(A)
print(len(s))

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
list=[]
s={}
for i in range(N):
    list.append(input().split()[1:])
    a = set(list)
    s = s & a
print(len(s)) 

Fixed submission:
N, M = map(int, input().split())
list=[]
s=set(range(1, M+1))
for i in range(N):
    K, *A = map(int, input().split())
    s &= set(A)
print(len(s))

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
s={}
for i in range(N):
    list.append(input().split()[1:])
    a = set(list)
    s = s & a
print(len(s)) 

Fixed submission:
N, M = map(int, input().split())
list=[]
s=set(range(1, M+1))
for i in range(N):
    K, *A = map(int, input().split())
    s &= set(A)
print(len(s))
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())

A = list(map(int, input().split()))
B = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]

DP = [-1]*(N+1)
DP[0] = 0 

for i in range(N):
    for j in A:
        if i+B[j] <= N:
            DP[i+B[j]] = max(DP[i]*10+j, DP[i+B[j]])

print(DP[N+1]) 

Fixed submission:
N, M = map(int, input().split())
A = list(map(int, input().split()))
B = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
dp = [-1]*(N+1)
dp[0]=0  
for i in range(N+1):
    for j in A:
        if i + B[j] <= N:
            dp[i+B[j]]= max(dp[i]*10+j, dp[i+B[j]])
print(dp[N])

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

A = list(map(int, input().split()))
B = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]

DP = [-1]*(N+1)
DP[0] = 0 

for i in range(N):
    for j in A:
        if i+B[j] <= N:
            DP[i+B[j]] = max(DP[i]*10+i,DP[i+B[j]])

print(DP[N+1]) 

Fixed submission:
N, M = map(int, input().split())
A = list(map(int, input().split()))
B = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
dp = [-1]*(N+1)
dp[0]=0  
for i in range(N+1):
    for j in A:
        if i + B[j] <= N:
            dp[i+B[j]]= max(dp[i]*10+j, dp[i+B[j]])
print(dp[N])
Buggy python submission (verdict: Runtime Error):
import numpy as np

N, W = map(int, input().split())

dp = np.full(N*10**3+1, W+1, dtype=int)

for i in range(N):
    w, v = map(int, input().split())
    dp[w:] = np.minimum(dp[:-v] + w, dp[v:])

print(np.max(np.where(dp <= W)))

Fixed submission:
import numpy as np

N, W = map(int, input().split())

dp = [float("INF")]*(N*10**3 + 1)
dp = np.array(dp)
dp[0] = 0

for i in range(N):
    w, v = map(int, input().split())
    dp[v:] = np.minimum(dp[:-v] + w, dp[v:])

print(np.max(np.where(dp <= W)))

Buggy python submission (verdict: Runtime Error):
import numpy as np
 
N, W = map(int,input().split())
 
dp = np.zeros(W+1, dtype=int)
 
for i in range(N):
    w, v = map(int,input().split())
    a = dp[:-w] + v
    b = dp[w:]
    m = np.maximum(a,b)
    dp[w:] = m

print(dp[-1])


Fixed submission:
import numpy as np

N, W = map(int, input().split())

dp = [float("INF")]*(N*10**3 + 1)
dp = np.array(dp)
dp[0] = 0

for i in range(N):
    w, v = map(int, input().split())
    dp[v:] = np.minimum(dp[:-v] + w, dp[v:])

print(np.max(np.where(dp <= W)))

Buggy python submission (verdict: Runtime Error):
import numpy as np

N, W = map(int, input().split())

dp = np.zeros(W+1, dtype=int)

for i in range(N):
    w, v = map(int, input().split())
    dp[w:] = np.maximum(dp[:-w] + v, dp[w:])

print(dp[-1])

Fixed submission:
import numpy as np

N, W = map(int, input().split())

dp = [float("INF")]*(N*10**3 + 1)
dp = np.array(dp)
dp[0] = 0

for i in range(N):
    w, v = map(int, input().split())
    dp[v:] = np.minimum(dp[:-v] + w, dp[v:])

print(np.max(np.where(dp <= W)))

Buggy python submission (verdict: Runtime Error):
import numpy as np

N, W = map(int, input().split())

dp = np.zeros(W+1, dtype=int)

for i in range(N):
    w, v = map(int, input().split())
    dp[w:] = max(dp[:-w] + v, dp[w:])

print(dp[-1])

Fixed submission:
import numpy as np

N, W = map(int, input().split())

dp = [float("INF")]*(N*10**3 + 1)
dp = np.array(dp)
dp[0] = 0

for i in range(N):
    w, v = map(int, input().split())
    dp[v:] = np.minimum(dp[:-v] + w, dp[v:])

print(np.max(np.where(dp <= W)))
Buggy python submission (verdict: Runtime Error):
D =int(input())
print('Christmas' if D==25 else 'Christmas Eve' if D==24 else 'Christmas Eve Eve' if D==23 else 'Christmas Eve Eve Eve' if D==22)

Fixed submission:
D =int(input())
print('Christmas'+' Eve'*(25-D))
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
H=[int(input()) for i in range(N)]

H.sort()

ans = float("inf")
for i in range(N-K+1):
    ans = min(ans, H[i+N-K]-H[i])

print(ans)

Fixed submission:
N, K = map(int, input().split())
H=[int(input()) for i in range(N)]

H.sort()

ans = float("inf")
for i in range(N-K+1):
    ans = min(ans, H[K-N+i-1]-H[i])

print(ans)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
H=[int(input()) for i in range(N)]

H.sort()

ans = float("inf")
for i in range(N-K+1):
    ans = min(ans, H[i+N-K]-H[i])

print(ans)

Fixed submission:
N, K = map(int, input().split())
H=[int(input()) for i in range(N)]

H.sort()

ans = float("inf")
for i in range(N-K+1):
    ans = min(ans, H[K-N+i-1]-H[i])

print(ans)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
H=[int(input()) for i in range(N)]

H.sort()

ans = float("inf")
for i in range(N-K+1):
    ans = min(ans, H[i+N-K-1]-H[i])

print(ans)

Fixed submission:
N, K = map(int, input().split())
H=[int(input()) for i in range(N)]

H.sort()

ans = float("inf")
for i in range(N-K+1):
    ans = min(ans, H[K-N+i-1]-H[i])

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

def f(x):
    if int(x) > N:
        return 0
    else:
        if all(x.count(j) >= 1 for j in [3, 5, 7]):
            ans = 1
        for i in [3, 5, 7]:
            ans += f(x+i)    
        return ans        

print(f("0"))

Fixed submission:
N = int(input())
def dfs(s):
    if int(s) > N:
        return 0
    else:
        if '7' in s and '5' in s and '3' in s:
            ret = 1
        else:
            ret = 0
        for i in '357':
            ret += dfs(s + i)
        return ret
print(dfs("0"))

Buggy python submission (verdict: Runtime Error):
from itertools import product

N = int(input())
ans = 0
for i in product("357", repeat=N):
    x = "".join(i)
    if 357 <= int(x) <= N and len(set(x)) = 3:
        ans += 1
print(ans)

Fixed submission:
N = int(input())
def dfs(s):
    if int(s) > N:
        return 0
    else:
        if '7' in s and '5' in s and '3' in s:
            ret = 1
        else:
            ret = 0
        for i in '357':
            ret += dfs(s + i)
        return ret
print(dfs("0"))

Buggy python submission (verdict: Runtime Error):
N = int(input())
def dfs(s):
    if int(s) > N:
        return 0
    else:
        if '7' in s and '5' in s and '3' in s:
            ret = 1
        else:
            ret = 0
        for c in '357':
            ret += dfs(s + c)
        return ret
print(def("0"))

Fixed submission:
N = int(input())
def dfs(s):
    if int(s) > N:
        return 0
    else:
        if '7' in s and '5' in s and '3' in s:
            ret = 1
        else:
            ret = 0
        for i in '357':
            ret += dfs(s + i)
        return ret
print(dfs("0"))
Buggy python submission (verdict: Runtime Error):
N = int(input())

n = [0]*(N+1)
for i in range(2, N+1):
    for j in range(2, i+1):
        while i%j == 0:
            i//=j
            n[j] += 1

def num(m):
    return len(list(filter(lambda x: x>=m-1, n)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)14+num(5)*(num(5)-1)*(num(3)-2)//2)

Fixed submission:
N = int(input())

n = [0]*(N+1)
for i in range(2, N+1):
    for j in range(2, i+1):
        while i%j == 0:
            i//=j
            n[j] += 1

def num(m):
    return len(list(filter(lambda x: x>=m-1, n)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)+num(5)*(num(5)-1)*(num(3)-2)//2)

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

n = [0]*(N+1)
for i in range(2, N+1):
    x = i
    for j in range(2, i+1):
        while x%j == 0:
            x//=j
            n[j] += 1

def num(m):
return len(list(filter(lambda x: x>=m-1, n)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)14+num(5)*(num(5)-1)*(num(3)-2)//2)

Fixed submission:
N = int(input())

n = [0]*(N+1)
for i in range(2, N+1):
    for j in range(2, i+1):
        while i%j == 0:
            i//=j
            n[j] += 1

def num(m):
    return len(list(filter(lambda x: x>=m-1, n)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)+num(5)*(num(5)-1)*(num(3)-2)//2)

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

n = [0]*(N+1)
for i in range(2, N+1):
    for j in range(2, i+1):
        while i%j == 0:
            i//=j
            n[j] += 1

def num(m):
return len(list(filter(lambda x: x>=m-1, n)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)14+num(5)*(num(5)-1)*(num(3)-2)//2)

Fixed submission:
N = int(input())

n = [0]*(N+1)
for i in range(2, N+1):
    for j in range(2, i+1):
        while i%j == 0:
            i//=j
            n[j] += 1

def num(m):
    return len(list(filter(lambda x: x>=m-1, n)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)+num(5)*(num(5)-1)*(num(3)-2)//2)

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

n = [0]*(N+1)
for i in range(2, N+1):
    for j in range(2, i+1):
        while i%j == 0:
            i//=j
            n[j] += 1

def num(m):
return len(list(filter(lambda x: x>=m-1, e)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)14+num(5)*(num(5)-1)*(num(3)-2)//2)

Fixed submission:
N = int(input())

n = [0]*(N+1)
for i in range(2, N+1):
    for j in range(2, i+1):
        while i%j == 0:
            i//=j
            n[j] += 1

def num(m):
    return len(list(filter(lambda x: x>=m-1, n)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)+num(5)*(num(5)-1)*(num(3)-2)//2)
Buggy python submission (verdict: Runtime Error):
from fractions import gcd

N, M = map(int,input().split())
S = list(input())
T = list(input())

gc = gcd(N, M)

ans = N*M//gc

for i in range(lcm//max(N, M)):
    if S[N//gc*i] != T[M//gc*i]:
        ans = -1
        break
                
print(ans)

Fixed submission:
from fractions import gcd
N,M=map(int,input().split())
S=list(input())
T=list(input())
L=gcd(N,M)
print(N*M//L if all([S[i*N//L]==T[i*M//L] for i in range(L)]) else "-1")

Buggy python submission (verdict: Runtime Error):
from fractions import gcd

N, M = map(int,input().split())
S = input()
T = input()

lcm = N*M//math.gcd(N, M)

ans = lcm

for i in range(lcm):
    if S[N//lcm*i] != T[M//lcm*i]:
        ans = -1
        break
                
print(ans)

Fixed submission:
from fractions import gcd
N,M=map(int,input().split())
S=list(input())
T=list(input())
L=gcd(N,M)
print(N*M//L if all([S[i*N//L]==T[i*M//L] for i in range(L)]) else "-1")

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd

N, M = map(int,input().split())
S = input()
T = input()

lcm = N*M//gcd(N, M)

ans = lcm

for n in range(N):
    for m in range(M):
        if (lcm//N)*n  == (lcm//M)*m:
            if S[n] != T[m]:
                ans = -1
                break
                
print(ans)


Fixed submission:
from fractions import gcd
N,M=map(int,input().split())
S=list(input())
T=list(input())
L=gcd(N,M)
print(N*M//L if all([S[i*N//L]==T[i*M//L] for i in range(L)]) else "-1")

Buggy python submission (verdict: Runtime Error):
from fractions import gcd

N, M = map(int,input().split())
S = input()
T = input()

lcm = N*M//math.gcd(N, M)

ans = lcm

for n in range(N):
    for m in range(M):
        if (lcm//N)*n  == (lcm//M)*m:
            if S[n] != T[m]:
                ans = -1
                break
                
print(ans)

Fixed submission:
from fractions import gcd
N,M=map(int,input().split())
S=list(input())
T=list(input())
L=gcd(N,M)
print(N*M//L if all([S[i*N//L]==T[i*M//L] for i in range(L)]) else "-1")

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

N, M = map(int,input().split())
S = input()
T = input()

lcm = N*M//math.gcd(N, M)

ans = lcm

for n in range(N):
    for m in range(M):
        if (lcm//N)*n  == (lcm//M)*m:
            if S[n] != T[m]:
                ans = -1
                break
                
print(ans)

Fixed submission:
from fractions import gcd
N,M=map(int,input().split())
S=list(input())
T=list(input())
L=gcd(N,M)
print(N*M//L if all([S[i*N//L]==T[i*M//L] for i in range(L)]) else "-1")
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = int(input())
B = int(input())
if N == 1:
    print("Hello World")
elif N ==2:
    print(A+B)

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

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = int(input())
B = int(input())
if N ==1:
    print("Hello World")
else:
    print(A+B)

Fixed submission:
N = int(input())
if N == 1:
    print("Hello World")
elif N ==2:
    A = int(input())
    B = int(input())
    print(A+B)
Buggy python submission (verdict: Runtime Error):
N, T = map(int, input().split())
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
    x=min(c, 1001)
print('TLE' if x=1001 else c)

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

cost = float("inf")
for i in range(N):
    c, t = map(int, input().split())
    if t <= T:
        cost = min(cost, c) 

print("TLE" if cost == float("inf") else cost)

Buggy python submission (verdict: Runtime Error):
N, T = map(int, input().split())
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
    min=min(c, 1001)
print('TLE' if min=1001 else c)

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

cost = float("inf")
for i in range(N):
    c, t = map(int, input().split())
    if t <= T:
        cost = min(cost, c) 

print("TLE" if cost == float("inf") else cost)

Buggy python submission (verdict: Runtime Error):
N, T = map(int, input().split())
z=1001
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
    min=(c, z)
print('TLE' if min=1001 else c)

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

cost = float("inf")
for i in range(N):
    c, t = map(int, input().split())
    if t <= T:
        cost = min(cost, c) 

print("TLE" if cost == float("inf") else cost)

Buggy python submission (verdict: Runtime Error):
N, T = map(int, input().split())
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
    min=(c, 1001)
print('TLE' if min=1001 else c)

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

cost = float("inf")
for i in range(N):
    c, t = map(int, input().split())
    if t <= T:
        cost = min(cost, c) 

print("TLE" if cost == float("inf") else cost)

Buggy python submission (verdict: Runtime Error):
N, T = map(int, input().split())
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
    print(min(c))
  else:
    print('TLE')

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

cost = float("inf")
for i in range(N):
    c, t = map(int, input().split())
    if t <= T:
        cost = min(cost, c) 

print("TLE" if cost == float("inf") else cost)

Buggy python submission (verdict: Runtime Error):
N, T = map(int, input().split())
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
    print(min(c))
  else:
    print('TLE')

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

cost = float("inf")
for i in range(N):
    c, t = map(int, input().split())
    if t <= T:
        cost = min(cost, c) 

print("TLE" if cost == float("inf") else cost)
Buggy python submission (verdict: Runtime Error):
N = int(input())

A=[]
for i in range(N):
    a, b, c = map(int, input().split())
    A.append([a, b, c])

A.sort(key=lambda x:-x[2])

for x in range(0, 101):
    for y in range(0, 101):
        H = A[0][2]+abs(A[0][0]-x)+abs(A[0][1]-y)
        Flag = True
        for i in range(1, N):
            if A[i][2] > 0:
                    if H != A[i][2]+abs(A[i][0]-x)+abs(A[i][1]-y):
                        Flag = False
                        break
            else:
                if H > abs(A[i][0]-x)+abs(A[i][1]-y):
                    Flag = False
                    break
        if Flag == True:
            print(x, y, h)

Fixed submission:
N = int(input())

A=[]
for i in range(N):
    a, b, c = map(int, input().split())
    A.append([a, b, c])

A.sort(key=lambda x:-x[2])

for x in range(0, 101):
    for y in range(0, 101):
        H = A[0][2]+abs(A[0][0]-x)+abs(A[0][1]-y)
        Flag = True
        for i in range(1, N):
            if A[i][2] > 0:
                    if H != A[i][2]+abs(A[i][0]-x)+abs(A[i][1]-y):
                        Flag = False
                        break
            else:
                if H > abs(A[i][0]-x)+abs(A[i][1]-y):
                    Flag = False
                    break
        if Flag == True:
            print(x, y, H)
Buggy python submission (verdict: Runtime Error):
print(100*x+10*x+x)

Fixed submission:
x=int(input())
for i in range(1, 10):
  a=100*i+10*i+i
  if a>=x:
    print(a)
    break

Buggy python submission (verdict: Runtime Error):
N=int(input())
x=-(-N//111)
print(100x+10x+x)

Fixed submission:
x=int(input())
for i in range(1, 10):
  a=100*i+10*i+i
  if a>=x:
    print(a)
    break
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())
ans = False
for i in range(X+1, Y+1):
    if i > max(x) and i <= min(y):
        ans = True
        break

print("War" if ans True else "No War")

Fixed submission:
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
ans = False
for i in range(X+1, Y+1):
    if i > max(x) and i <= min(y):
        ans = True
        break

print("War" if ans == False else "No War")
Buggy python submission (verdict: Runtime Error):
S= input()
T= input()
SS = {}
TT = {}
for i in range(len(S)):
    s = S[i]
    t = T[i]
    if s not in SS:
        SS[s] = t
    elif SS[s] != t:
        print("No")
        break
    if if t not in TT:
        TT[t] = s
    elif TT[t] != s:
        print("No")
        break
else:
    print("Yes")

Fixed submission:
s=input()
t=input()
S=sorted(map(s.count,set(s)))
T=sorted(map(t.count,set(t)))
print("Yes" if S==T else "No")