Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
data = [input() for i in range(2)]

if data[0]>=3200:
  print(data[1])

else:
  print("red")

Fixed submission:
n=int(input())
s=input()
print(s if n>=3200 else 'red')
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
sum=0
for i in range(n):
  sum = sum + 1/data[i]
print(1/sum)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
sum=0
for i in a:
  sum = sum + 1/i
print(1/sum)

Buggy python submission (verdict: Runtime Error):
n=int(input())
data = [input() for i in range(n)]
sum=0
for i in range(n):
  sum = sum + 1/data[i]
print(1/sum)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
sum=0
for i in a:
  sum = sum + 1/i
print(1/sum)
Buggy python submission (verdict: Runtime Error):
import sys

inputs = []
for line in sys.stdin:
    inputs.append(line)
    
if inputs[0] >= 3200:
  print(inputs[1])
else:
  print('red')
  
  

Fixed submission:

import sys
 
inputs = []
for line in sys.stdin:
    inputs.append(line)
    
if int(inputs[0]) >= 3200:
  print(inputs[1])
else:
  print('red')

Buggy python submission (verdict: Runtime Error):
import sys
 
def red_or_nod(s:str, a:int):
  if int(a) >= 3200:
    print(s)
  else:
    print('red')
    
red_or_nod(sys.argv[1], sys.argv[2])

Fixed submission:

import sys
 
inputs = []
for line in sys.stdin:
    inputs.append(line)
    
if int(inputs[0]) >= 3200:
  print(inputs[1])
else:
  print('red')

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

def red_or_nod(a:int, s:str):
  if int(a) >= 3200:
    print(s)
  else:
    print('red')
    
red_or_nod(sys.argv[1], sys.argv[2])


Fixed submission:

import sys
 
inputs = []
for line in sys.stdin:
    inputs.append(line)
    
if int(inputs[0]) >= 3200:
  print(inputs[1])
else:
  print('red')

Buggy python submission (verdict: Runtime Error):
a=input()
s=input()
a=int(a)
s=int(s)
if a>=3200:
    print(s)
elif a<3200:
    print("red")

Fixed submission:
a=input()
s=input()
a=int(a)
if a>=3200:
    print(s)
elif a<3200:
    print("red")

Buggy python submission (verdict: Runtime Error):
a=input()
s=input()
a=int(a)
s=int(s)
if a>=3200:
    print(s)
elif a<3200:
    print("red")

Fixed submission:
a=input()
s=input()
a=int(a)
if a>=3200:
    print(s)
elif a<3200:
    print("red")

Buggy python submission (verdict: Runtime Error):
first=input()
(a, s)=first.split()
a=int(a)
s=int(s)
if a>=3200:
    print(s)
elif a<3200:
    print("red")

Fixed submission:
a=input()
s=input()
a=int(a)
if a>=3200:
    print(s)
elif a<3200:
    print("red")

Buggy python submission (verdict: Runtime Error):
N = int(input())
if N>0 or N<=100:
    A = []
    for i in range(0,N):
      B = int(input())
      if B>0 or B<=1000:
          A.append(B)
 
    sum1 = 1/A[0]
 
    for i in range(0,N-1):
      sum1 = sum1 + 1/A[i+1]
 
    result = 1/sum1
    print(result)

Fixed submission:
if __name__=="__main__":
    import sys
    a = int(input())
    s = input()

if a>=3200:
    print(s)
else:
    print('red')

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = []
for i in range(0,N):
  B = int(input())
  A.append(B)

sum1 = float(1/A[0])

for i in range(0,N-1):
  sum1 = sum1 + 1/A[i+1]

result = 1/sum1
print(result)

Fixed submission:
if __name__=="__main__":
    import sys
    a = int(input())
    s = input()

if a>=3200:
    print(s)
else:
    print('red')

Buggy python submission (verdict: Runtime Error):
if __name__=="__main__":
    import sys
    a = int(input("Please enter a nubmer: "))
    s = input("Please enter a String: ")
 else:
     a = input()
     s = input()
if a>=3200:
 print(s)
else:
 print('red')


Fixed submission:
if __name__=="__main__":
    import sys
    a = int(input())
    s = input()

if a>=3200:
    print(s)
else:
    print('red')
Buggy python submission (verdict: Runtime Error):
def main():
  n = int(input())
  ks = sorted(list(map(int, input().split())))
  a, b = ks[n/2-1:n/2]
  if a == b:
    print(0)
  else:
    print(b-a)
  
  
if __name__ == '__main__':
  main()

Fixed submission:
def main():
    n = int(input())
    ks = sorted(list(map(int, input().split())))
    a, b = ks[n//2-1:n//2+1]
    if a == b:
        print(0)
    else:
        print(b-a)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#include<algorithm>
#include <iostream>
#include<vector>
#include<string>
#include <iomanip>
#include <queue> 
using namespace std;

int main(){
    int n,Q;
    cin>>n>>Q;

    vector<vector<int>> adj(n+1);

    for(int i=1;i<n;i++){
        int p,c;
        cin>>p>>c;
        adj[p].push_back(c);
    }

    vector<long long> cost(n+1,0);

    for(int i=0;i<Q;i++){
        int v,c;
        cin>>v>>c;
        cost[v] += c;
    }

    queue <int> q;

    int a = 0;
    for(int i=0;i<adj.size();i++)
        if(adj[i].size()>0){
            a=i;
            break;
        }
    q.push(a);
    // vector<bool> vis(n+1,0);
    // vis[a] = 1;
    while(!q.empty()){
        int nc = q.size();
        
        while(nc>0){
            int pa = q.front();
            q.pop();
            nc--;
            long long pc = cost[pa];
            for(int i=0;i<adj[pa].size();i++){
                
                    // vis[adj[pa][i]]==1;
                    q.push(adj[pa][i]);
                    cost[adj[pa][i]] += pc;
                
            }
        }
    }

    for(int i=1;i<n+1;i++)
        cout<<cost[i]<<" ";
    cout<<endl;
}

Fixed submission:
import collections

n,q=map(int,input().split())
cnt=[0]*(n+1)
g=[[] for _ in range(n+1)]
for _ in range(n-1): #木グラフの隣接リストを作成
 a,b=map(int,input().split())
 g[a].append(b)
 g[b].append(a)
for _ in range(q): #各頂点についてcount[v]を計算
 v,val=map(int,input().split())
 cnt[v]+=val
q=collections.deque()
q.append(1) #DFSのスタックによる実装、まずスタックに始点1を積む
checked=[0]*(n+1) #各頂点を見たかどうかのフラグを持っておく
while q:
 v=q.pop()
 checked[v]=1 #頂点を見たかどうかのフラグを更新する
 for u in g[v]:
   if checked[u]==1: #vの子ノードuについて、まだ見ていない頂点であればcount[u]をcount[u]+=count[v]として更新する
     continue
   cnt[u]+=cnt[v]
   q.append(u) #スタックに子ノードuを積む
print(*cnt[1:]) #各頂点のcountが答えとなる
Buggy python submission (verdict: Runtime Error):
inputs = input().split('\n')
n = inputs[0]
color = inputs[1]

if n >= 3200:
  print(color)
else:
  print('red')

Fixed submission:
n = int(input())
color = input()
 
if n >= 3200:
  print(color)
else:
  print('red')

Buggy python submission (verdict: Runtime Error):
a = int(input())
s = input()
if (a=>3200):print(s)
else:print("red")

Fixed submission:
a = int(input())
s = input()
if a>=3200:print(s)
else:print("red")

Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-

a = input()
s = input()
if a>3199:
        print(s)
else:
        print ("red")     

Fixed submission:
a = int(input())
s = input()
if a>=3200:print(s)
else:print("red")

Buggy python submission (verdict: Runtime Error):
a = input()
s = input()
if s[0]>3199:
        print(s[1])
else:
        print ("red")     

Fixed submission:
a = int(input())
s = input()
if a>=3200:print(s)
else:print("red")

Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
        s = [input() for i in range(3)]
        if s[0]>3199:
                print(s[1])
        else:
                print ("red")     

Fixed submission:
a = int(input())
s = input()
if a>=3200:print(s)
else:print("red")

Buggy python submission (verdict: Runtime Error):
a =input()
s =input()
if(a<=3200):
	print("red")
print(pink)

Fixed submission:
a = int(input())
s = input()
if a>=3200:print(s)
else:print("red")
Buggy python submission (verdict: Runtime Error):
n = int(input())
v = list(map(int, input().split()))

v1 = v.sort().reverse()
k = 0

for i in range(n):
  k += v[i] * (2 ** ( - (i + 1)))

print(k + v[n] * (2 ** ( - (n + 1)))

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

v1 = list(sorted(v))
v2 = list(reversed(v1))
k = 0

for i in range(n):
  k += v2[i] * (2 ** ( -i - 1))

k += v2[n - 1] * (2 ** ( -n)) 

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

if n*a < b:
  print(na)
else:
  print(b)

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

if n*a < b:
  print(n*a)
else:
  print(b)

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

if na < b:
  print(na)
  else:
    print(b)

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

if n*a < b:
  print(n*a)
else:
  print(b)

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

print(na if na< b else: b)

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

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

if A >= 13:
    print(B)

elif A >= 6 and A <= 12:
    print(B/2)

elif A <= 5
    print(0)


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


if A >= 13:
    print(B)

elif A >= 6 and A <= 12:
    print(int(B/2))

else:
    print(0)
Buggy python submission (verdict: Runtime Error):
X,xt = map(int,input().split())
print(T/X)

Fixed submission:
X,T = map(int,input().split())
print(X/T)
Buggy python submission (verdict: Runtime Error):
D = (int,input()
if D == 25:
    print('Christmas')
elif D == 24:
    print('Christmas Eve')
elif D == 23:
    print('Christmas Eve Eve')
else:
    print('Christmas Eve Eve Eve')            

Fixed submission:
D = int(input())
if D == 25:
    print('Christmas')
elif D == 24:
    print('Christmas Eve')
elif D == 23:
    print('Christmas Eve Eve')
elif D == 22:
    print('Christmas Eve Eve Eve')
Buggy python submission (verdict: Runtime Error):
S = map(int,input().split())
a = 0
while a >= 4:
    if S = "+":
        a += 1
    else:
        a -= 1    
print(a)        

Fixed submission:
S = input()
print(S.count("+")-S.count("-"))

Buggy python submission (verdict: Runtime Error):
S = map(int,input().split)
a = 0
while a >= 4:
    if S = "+":
        a += 1
    else:
        a -= 1    
print(a)        

Fixed submission:
S = input()
print(S.count("+")-S.count("-"))
Buggy python submission (verdict: Runtime Error):
N = map(int,input().split())

if N >=1000:
  print("ABD")

else:
  print("ABC")

Fixed submission:
N = int(input())
if N < 1000:
    print("ABC")
else:
    print("ABD")

Buggy python submission (verdict: Runtime Error):
N = map(int(input().split()))
if N < 1000:
    print("ABC")
else:
    print("ABD")



Fixed submission:
N = int(input())
if N < 1000:
    print("ABC")
else:
    print("ABD")
Buggy python submission (verdict: Runtime Error):
a,b,c =input().split()

if a=<b:
  ans=c
else:
  ans=c-(a-b)
  if ans<0:
    ans=0
    
  
print(ans)

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

if a <= b:
    ans = c
else:
	ans = c-(a-b)
	if ans < 0:
		ans = 0
    
print(ans)

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

if a=<b:
  ans=c
else:
  ans=c-(a-b)
  if ans<0:
    ans=0
    
  
print(ans)

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

if a <= b:
    ans = c
else:
	ans = c-(a-b)
	if ans < 0:
		ans = 0
    
print(ans)

Buggy python submission (verdict: Runtime Error):
a,b,c =int(input())

if a=<b:
  ans=c
else:
  ans=c-(a-b)
  if ans<0:
    ans=0
    
  
print(ans)

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

if a <= b:
    ans = c
else:
	ans = c-(a-b)
	if ans < 0:
		ans = 0
    
print(ans)

Buggy python submission (verdict: Runtime Error):
a,b,c =int(input())

if a=<b:
  ans=c
elif:
  ans=c-(a-b)
  if ans<0:
    ans=0
    
  
print(ans)

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

if a <= b:
    ans = c
else:
	ans = c-(a-b)
	if ans < 0:
		ans = 0
    
print(ans)

Buggy python submission (verdict: Runtime Error):
a,b,c =int(input())

if a=<b:
  ans=c
elif:
  ans=c-(a-b)
  if ans<0:
    ans=0
    
  
print(ans)

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

if a <= b:
    ans = c
else:
	ans = c-(a-b)
	if ans < 0:
		ans = 0
    
print(ans)
Buggy python submission (verdict: Runtime Error):
a = input()
s = input()
if a>=3200:
  print(s)
else:
  print('red')

Fixed submission:
a = input()
s = input()
if int(a)>=3200:
  print(s)
else:
  print('red')
Buggy python submission (verdict: Runtime Error):
N=int(input())
v=list(map(int,input().split())).sorted()
for a in range(N-1):
  v[1]=(v[0]+v[1])/2
  v.pop(0)
print(v[0])

Fixed submission:
N=int(input())
v=list(map(int,input().split()))
v.sort()
for a in range(N-1):
  v[1]=(v[0]+v[1])/2
  v.pop(0)
print(v[0])

Buggy python submission (verdict: Runtime Error):
N=int(input())
v=list(map(int,input().split())).sort()
for a in range(N-1):
  v[1]=(v[0]+v[1])/2
  v.pop(0)
print(v[0])

Fixed submission:
N=int(input())
v=list(map(int,input().split()))
v.sort()
for a in range(N-1):
  v[1]=(v[0]+v[1])/2
  v.pop(0)
print(v[0])

Buggy python submission (verdict: Runtime Error):
N=int(input())
v=list(map(int,input().split())).sort()
for a in range(N-1):
  v[1]=(v[0]+v[1])/2
  v[0].pop()
print(v[0])

Fixed submission:
N=int(input())
v=list(map(int,input().split()))
v.sort()
for a in range(N-1):
  v[1]=(v[0]+v[1])/2
  v.pop(0)
print(v[0])
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import math
N, A, B = map(int, input().split())
V = list(map(int, input().split()))
V.sort(reverse=True)
maxavg = sum(V[:A])/A
print(maxavg)
min = V[A-1]
ltAnum = 0
minnum = 0
for i in range(N):
    if V[i] > min:
        ltAnum = ltAnum + 1
    elif V[i] == min:
        minnum = minnum + 1
    else:
        break
#print(ltAnum)
#print(minnum)

import math
def nCr(n,r):
    f = math.factorial
    return f(n)//f(r)//f(n-r)

c_min = 0
import itertools
if ltAnum > 0:
    c_min = nCr(minnum, A-ltAnum)
if ltAnum == 0:
    for j in range(A, B+1):
        if minnum < j:
            break
        else:
            c_min = c_min + nCr(minnum, j)
print(c_min)


Fixed submission:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())
print("%d" % ((A+B)%24))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N, M = map(int, input().split())
students = []
checkpoints = []
for i in range(N):
    students.append(list(map(int, input().split())))
#print(students)
for i in range(M):
    checkpoints.append(list(map(int, input().split())))
#print(checkpoints)
for i in range(N):
    mincp = -1
    mindist = -1
    for j in range(M):
        dist = abs(students[i][0]-checkpoints[j][0]) + abs(students[i][1]-checkpoints[j][1])
        if mincp == -1:
            mincp = j
            mindist = dist
        else:
            if dist < mindist:
                mindist = dist
                mincp = j
    print("%d" % (mincp+1))


Fixed submission:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())
print("%d" % ((A+B)%24))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import itertools
N, K = map(int, input().split())
A = list(map(int, input().split()))
unnec = 0
for i in range(0,N):
    B = list(A)
    v = B.pop(i)
    nec = False
    for j in range(len(B),0,-1):
        for l in list(itertools.combinations(B,j)):
            s = sum(l)
            #print("%s, %d, %d" % (str(l), s, v))
            if s >= K:
                continue
            elif s + v >= K:
                nec = True
                break
        if nec == True:
            break
    if nec == False:
        unnec = unnec + 1
print(unnec)


Fixed submission:
# -*- coding: utf-8 -*-
a, b = input().split()
if a == 'H':
    print(b)
else:
    if b == 'H':
        print('D')
    else:
        print('H')
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

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

# N-1 .. 0
cnum = 1
for i in range(N-1,0,-1):
    #print(A[:i])
    #print(A[i])
    if sum(A[:i]) * 2 < A[i]:
        break
    else:
        cnum += 1
print(cnum)


Fixed submission:
# -*- coding: utf-8 -*-

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

# N-1 .. 0
cnum = 1
for i in range(N-1,0,-1):
    sumA -= A[i]
    if sumA * 2 < A[i]:
        break
    else:
        cnum += 1
print(cnum)
Buggy python submission (verdict: Runtime Error):
def main():
    n = int(input())
    ps = [int(x) for x in input().split()]

    dis = []

    for n, p in enumerate(ps):
        if n + 1 != p:
            dis.append(p)

    if len(dis) == 2 or len(dis) == 0:
        print("YES")
    else:
        print("NO")

main()

Fixed submission:
ab = input().split()
a = int(ab[0])
b = int(ab[1])
 
if (a + b) % 2 == 0:
    print((a + b) // 2)
else:
    print("IMPOSSIBLE")

Buggy python submission (verdict: Runtime Error):
if __name__ == '__main__':
    n = int(input())
    ps = [int(x) for x in input().split()]

    dis = []

    for n, p in enumerate(ps):
        if n + 1 != p:
            dis.append(p)

    if len(dis) == 2 or len(dis) == 0:
        print("YES")
    else:
        print("NO")

Fixed submission:
ab = input().split()
a = int(ab[0])
b = int(ab[1])
 
if (a + b) % 2 == 0:
    print((a + b) // 2)
else:
    print("IMPOSSIBLE")

Buggy python submission (verdict: Runtime Error):
ab = input().split()
a = ab[0]
b = ab[1]

if (a + b) % 2 == 0:
  print (a + b) // 2
else:
  "IMPOSSIBLE"

Fixed submission:
ab = input().split()
a = int(ab[0])
b = int(ab[1])
 
if (a + b) % 2 == 0:
    print((a + b) // 2)
else:
    print("IMPOSSIBLE")
Buggy python submission (verdict: Runtime Error):
    n = int(input()
    ps = [int(x) for x in input().split()]

    dis = []

    for n, p in enumerate(ps):
        if n + 1 != p:
            dis.append(p)

    if len(dis) == 2 or len(dis) == 0:
        print("YES")
    else:
        print("NO")

Fixed submission:
if __name__ == '__main__':
    n = int(input())
    ps = [int(x) for x in input().split()]

    dis = []

    for n, p in enumerate(ps):
        if n + 1 != p:
            dis.append(p)

    if len(dis) == 2 or len(dis) == 0:
        print("YES")
    else:
        print("NO")

Buggy python submission (verdict: Runtime Error):
if __name__ == '__main__':
    n = int(input()
    ps = [int(x) for x in input().split()]

    dis = []

    for n, p in enumerate(ps):
        if n + 1 != p:
            dis.append(p)

    if len(dis) == 2 or len(dis) == 0:
        print("YES")
    else:
        print("NO")

Fixed submission:
if __name__ == '__main__':
    n = int(input())
    ps = [int(x) for x in input().split()]

    dis = []

    for n, p in enumerate(ps):
        if n + 1 != p:
            dis.append(p)

    if len(dis) == 2 or len(dis) == 0:
        print("YES")
    else:
        print("NO")
Buggy python submission (verdict: Runtime Error):
if __name__ == '__main__':
    n = int(input())
    al = [int(a) for a in input().split()]
    bl = [int(b) for b in input().split()]

    score = 0
    while len(bl) > 0:
        a = al.pop()
        b = bl.pop()

        if a >= b:
            score += b
        else:
            score += a
            b -= a
            a2 = al.pop()

            if a2 > b:
                score += b
                a2 -= b
                al.append(a2)
            else:
                score += a2
    print(score)




Fixed submission:
if __name__ == '__main__':
    n = int(input())
    al = [int(a) for a in input().split()]
    bl = [int(b) for b in input().split()]

    score = 0
    remaining = 0
    for i in range(n):
        a = al[i]
        b = bl[i]
        if a >= b:
            score += b
        else:
            score += a
            b -= a
            a2 = al[i + 1]
            if a2 > b:
                score += b
                a2 -= b
                al[i + 1] = a2
            else:
                score += a2
                al[i + 1] = 0
    print(score)
Buggy python submission (verdict: Time Limit Exceeded):
if __name__ == '__main__':
    MOD = 1000000007
    s = input()
    n = len(s)

    dp = [[0 for _ in range(13)]]
    dp[0][0] = 1

    for i, c in enumerate(s):
        if c == "?":
            cn = -1
        else:
            cn = int(c)

        dp.append([0 for _ in range(13)])
        for j in range(10):
            if cn != -1 and cn != j: continue
            for ki in range(13):
                dp[i + 1][(ki * 10 + j) % 13] += dp[i][ki]
        for j in range(13):
            dp[i + 1][j] %= MOD
    result = dp[n][5]

    print(result)

Fixed submission:
if __name__ == '__main__':
    MOD = 1000000007
    s = input()
    n = len(s)

    dp = [[0 for _ in range(13)]]
    dp[0][0] = 1

    for i, c in enumerate(s):
        if c == "?":
            cn = -1
        else:
            cn = int(c)

        dp.append([0 for _ in range(13)])
        for j in range(10):
            if cn != -1 and cn != j: continue
            for ki in range(13):
                dp[i + 1][(ki * 10 + j) % 13] += dp[i][ki]
        for j in range(13):
            dp[i + 1][j] %= MOD
    result = dp[n][5]

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

N = int(input())
V = input().split()
V = np.array(V).astype(int)
V = np.sort(V)

U = np.array([])

for _ in range(2):
    U = np.append(U, 0.5**(N-1))
    
for i in range(2, N):
    U = np.append(U, 0.5**(N-i))

print(V @ U)


Fixed submission:
import numpy as np

N = int(input())
V = input().split()
V = np.array(V).astype(int)
V = np.sort(V)

U = np.array([])

for _ in range(2):
    U = np.append(U, 0.5**(N-1))
    
for i in range(2, N):
    U = np.append(U, 0.5**(N-i))

print(np.dot(U, V))
Buggy python submission (verdict: Runtime Error):
n=input()
l=len(n)
a="90909"[:l-1]
print(a if l %2 ==0 else int(n)-int(a))

Fixed submission:
n=input()
l=len(n)
a="090909"[:l]
print(a[1:] if l %2 ==0 else int(n)-int(a))
Buggy python submission (verdict: Runtime Error):


a = input()
s = input()

if a >= 3200:
	print(s)
else
	print("red")



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

if int(a) < 3200:
	print("red")
else:
	print(s)
Buggy python submission (verdict: Runtime Error):
N = int(input())
arr = input()

mother = 0
for i in arr:
  if i != " ":
  	mother = mother + 1 / int(i) 

print(1/mother)

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

hoge = arr.split(" ")

mother = 0
for i in hoge:
  mother = mother + 1 / int(i) 

print(1/mother)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
nList = [int(input()) for _ in range(N)]
ansList = nList[:]
for i in range(N):
    del ansList[i]
    print(max(ansList))
    ansList = nList[:]

Fixed submission:
import numpy as np
N = int(input())
nList = [int(input()) for _ in range(N)]
maxN = max(nList)
lenMaxN = np.argmax(nList)
ansList = [maxN for _ in range(N)]
if nList.count(maxN) >= 2:
    for i in range(N):
        print(ansList[i])

else:
    second = sorted(set(nList))[-2]
    ansList[lenMaxN] = second
    for i in range(N):
        print(ansList[i])
Buggy python submission (verdict: Runtime Error):
n = input()
N = int(n)

a = int((n[-3:]))

y = 0
if a >= 753:
    x = 6
elif a >= 735:
    x = 5
elif a >= 573:
    x = 4
elif a >= 537:
    x = 3
elif a >= 375:
    x = 2
elif a >= 357:
    x = 1
elif a < 356:
    x =0

for i in range(0, len(n)-3):
    if int(n[i]) == 0:
        y = y
    elif int(n[i]) >=7:
        y += (len(n) - i) * 3 - 9
    elif int(n[i]) >=5:
        y += (len(n) - i) * 3 - 10
    elif int(n[i]) >= 3:
        y += (len(n) - i) * 3 - 11
    elif int(n[i]) == 2 or 1:
        y += (len(n) - i) * 3 - 12

print(x + y)


Fixed submission:
def listup(number, n):

    if number > 10 ** 9:
        return
    else:
        number = 10 * number + n
        if "7" in str(number):
            if "5" in str(number):
                if "3" in str(number):
                    list753.append(number)
        listup(number, 3)
        listup(number, 5)
        listup(number, 7)

list753 = []
ans = 0
N = int(input())
listup(0, 0)
for i in range(len(list753)):
    if N - list753[i] >= 0:
        ans += 1

print(ans)