Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
A, B = input().split() 

if A < 5:
  print(0)
elif A < 12:
  C = B / 2
  print(C)
else :
  print(B)

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

if A <= 5:
  print(0)
elif A <= 12:
  C = B / 2
  print(int(C))
else :
  print(B)
Buggy python submission (verdict: Runtime Error):
A = [int(input()) for i in range(5)]
K = input()

lenge = 0

for i in range(A):
  for j in range(A):
    if A[i] - A[j] > K:
      lenge += 1
      
if lenge == 0:
  print(":(")
else :
  print("Yay!")


Fixed submission:
A = [int(input()) for _ in range(5)]
K = int(input())

lenge = 0

for i in range(5):
  for j in range(5):
    if A[i] - A[j] > K:
      lenge += 1
      
if lenge > 0:
  print(":(")
else :
  print("Yay!")

Buggy python submission (verdict: Runtime Error):
A = [int(input()) for i in range(5)]
K = input()

lenge = 0

for i in range(A):
  for j in range(A):
    if A[i] - A[j] > K:
      s += 1
      
if s == 0:
  print(":(")
else :
  print("Yay!")

Fixed submission:
A = [int(input()) for _ in range(5)]
K = int(input())

lenge = 0

for i in range(5):
  for j in range(5):
    if A[i] - A[j] > K:
      lenge += 1
      
if lenge > 0:
  print(":(")
else :
  print("Yay!")
Buggy python submission (verdict: Runtime Error):
b = input()

if b == "T":
  OUT = "A"
elif  b == "A":
    OUT = "T"
elif b == "G":
    OUT = "C"
else:
    OUT == "G"

print(OUT)      

Fixed submission:
b = input()

if b == "T":
  OUT = "A"
elif b == "A":
    OUT = "T"
elif b == "G":
    OUT = "C"
else:
    OUT = "G"

print(OUT)
Buggy python submission (verdict: Runtime Error):
A = input()

S = 0
for i in A:
  S = S + A(i)
  
if (int(A) % S) == 0:
  print("Yes")
else:
  print("No")  


Fixed submission:
A = input()

S = 0
for i in A:
  S = S + int(i)
  
if (int(A) % S) == 0:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
A = input()

S = 0
for i in A:
  S = S + A[i]
  
if int(A) % S == 0:
  print("Yes")
else:
  print("No")  


Fixed submission:
A = input()

S = 0
for i in A:
  S = S + int(i)
  
if (int(A) % S) == 0:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
A = input()

S = 0
for i in A:
  S += A[i]
  
if int(A) % S == 0:
  print("Yes")
else:
  print("No")  


Fixed submission:
A = input()

S = 0
for i in A:
  S = S + int(i)
  
if (int(A) % S) == 0:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
A = input()

S = 0
for i in range(0,10):
  S += A[i]
  
if int(A) % S == 0:
  print("Yes")
else:
  print("No")  


Fixed submission:
A = input()

S = 0
for i in A:
  S = S + int(i)
  
if (int(A) % S) == 0:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
A = input()

S = 0
for i in range(0,10):
  S += A[i]
  
if A % S == 0:
  print("Yes")
else:
  print("No")  


Fixed submission:
A = input()

S = 0
for i in A:
  S = S + int(i)
  
if (int(A) % S) == 0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = map(int, input().split())

SUM = 0
for i in range(N):
  while a[i] >= 2 and a[i] % 2 == 0:
    SUM += 1
    a[i] //= 2
    
print(SUM)






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

SUM = 0
for i in range(N):
  while a[i] >= 2 and a[i] % 2 == 0:
    SUM += 1
    a[i] //= 2
    
print(SUM)

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

SUM = 0
for i in range(N):
  while a[i] >= 2 and a % 2 == 0:
    SUM += 1
    a[i] //= 2
    
print(SUM)






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

SUM = 0
for i in range(N):
  while a[i] >= 2 and a[i] % 2 == 0:
    SUM += 1
    a[i] //= 2
    
print(SUM)

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

SUM = 0
for i in range(N):
  while a[i] >= 2 and a % 2 == 0:
    SUM += 1
    a[i] //= 2
    
print(SUM)






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

SUM = 0
for i in range(N):
  while a[i] >= 2 and a[i] % 2 == 0:
    SUM += 1
    a[i] //= 2
    
print(SUM)
Buggy python submission (verdict: Runtime Error):
A = input()

if A >= 1000:
  print("ABD")
else:
  print("ABC")

Fixed submission:
A = int(input())

if A >= 1000:
  print("ABD")
else:
  print("ABC")
Buggy python submission (verdict: Runtime Error):
#標準入力
N = int(input())
S = input()

Max_count = 0
#処理
for i in range(0, N):
  temporary_count = set(S[i:]) and (S[:i])
  if temporary_count > Max_count:
    Max_count = temporary_count
    
print(Max_count)  

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

Max_count = 0
#処理
for i in range(1, N):
  temporary_count = len(set(S[i:]) & set(S[:i]))
  if temporary_count > Max_count:
    Max_count = temporary_count
    
print(Max_count)
Buggy python submission (verdict: Runtime Error):
A, B, C, D = map(int, input().split())

if abs(A - C) <= D: #直接会話する場合
  print("Yes")
elif (abs(A - B) <= D) AND (abs(B - C) <= D): #間接的に会話する場合
  print("Yes")
else:
  print("No")

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

if abs(A - C) <= D: #直接会話する場合
  print("Yes")
elif (abs(A - B) <= D) and (abs(B - C) <= D): #間接的に会話する場合
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
A, B, C, D = map(int, input().split())

if abs(A - C) <= D: #直接会話する場合
  print("Yes")
else:
  if (abs(A - B) <= D) AND (abs(B - C) <= D):
    print("Yes")
  else:
    print("No")

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

if abs(A - C) <= D: #直接会話する場合
  print("Yes")
elif (abs(A - B) <= D) and (abs(B - C) <= D): #間接的に会話する場合
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
A, B, K =map(int,input().split())

if B-A <= K:
  for i in range(A, B):
    print(i)
else:
  C = []
  for i in range(A, A+K):
    C.append(i)
  
  D = []  
  for i in range(B, B-K+1, -1) :
    D.append(i)

E = set(C) | set(D)
F = sorted(E)
print(F)


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

if B-A <= K:
  for i in range(A, B+1):
    print(i)
else:
  C = []
  for i in range(A, A+K):
    C.append(i)
  
  D = []  
  for i in range(B, B-K, -1) :
    D.append(i)
    
  E = set(C) | set(D)
  F = sorted(E)
  
  for i in range(len(F)):
      print(F[i])

Buggy python submission (verdict: Runtime Error):
A, B, K =map(int,input().split())

if B-A <= K:
  for i in range(A, B):
    print(i)
else:
  C = []
  for i in range(A, A+K):
    C.append(i)
  
  D = []  
  for i in range(B, B-K, -1) :
    D.append(i)

E = set(C) | set(D)
F = sorted(E)
print(F)


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

if B-A <= K:
  for i in range(A, B+1):
    print(i)
else:
  C = []
  for i in range(A, A+K):
    C.append(i)
  
  D = []  
  for i in range(B, B-K, -1) :
    D.append(i)
    
  E = set(C) | set(D)
  F = sorted(E)
  
  for i in range(len(F)):
      print(F[i])

Buggy python submission (verdict: Runtime Error):
A, B, K =map(int,input().split())

if B-A < K:
  for i in range(A, B):
    print(i)
else:
  C = []
  for i in range(A, A+K):
    C.append(i)
  
  D = []  
  for i in range(B, B-K, -1) :
    D.append(i)

E = set(C) | set(D)
F = sorted(E)
print(F)


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

if B-A <= K:
  for i in range(A, B+1):
    print(i)
else:
  C = []
  for i in range(A, A+K):
    C.append(i)
  
  D = []  
  for i in range(B, B-K, -1) :
    D.append(i)
    
  E = set(C) | set(D)
  F = sorted(E)
  
  for i in range(len(F)):
      print(F[i])
Buggy python submission (verdict: Runtime Error):
#標準入力
N = int(input())
D, X = list(map(int, input().split()))

A = []
for i in range(N):
    A.append(input())
    
B=0
for i in range(N):
    B += 1 + (D-1)//A[i]

    
Total = X + B

print(Total)



Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())

if A < B:
  E = A
else:
  E = B
  
if C < D:
  F = C
else:
  F = D
  
print(E+F)
Buggy python submission (verdict: Runtime Error):
N = int(input())
D, X = map(int, input().split())
A = []
for i in range(N):
    A.append(input())
    
B=0
for i in range(N):
    B += 1 + (D-1)//A[i]

    
Total = X + B

print(Total)



Fixed submission:
N = int(input())
D, X = map(int, input().split())
A = []
for i in range(N):
    A.append(int(input()))
    
B=0
for i in range(N):
    B += 1 + (D-1)//A[i]

    
Total = X + B

print(Total)

Buggy python submission (verdict: Runtime Error):
N = int(input())
D, X = = map(int, input().split())
A = []
for i in range(N):
    A.append(input())
    
B=0
for i in range(N):
    B += 1 + (D-1)//A[i]

    
Total = X + B

print(Total)



Fixed submission:
N = int(input())
D, X = map(int, input().split())
A = []
for i in range(N):
    A.append(int(input()))
    
B=0
for i in range(N):
    B += 1 + (D-1)//A[i]

    
Total = X + B

print(Total)

Buggy python submission (verdict: Runtime Error):
#標準入力
N = int(input())
D, X = list(map(int, input().split()))
A = []
for i in range(N):
    A.append(input())
    
B=0
for i in range(N):
    B += 1 + (D-1)//A[i]

    
Total = X + B

print(Total)



Fixed submission:
N = int(input())
D, X = map(int, input().split())
A = []
for i in range(N):
    A.append(int(input()))
    
B=0
for i in range(N):
    B += 1 + (D-1)//A[i]

    
Total = X + B

print(Total)

Buggy python submission (verdict: Runtime Error):
#標準入力
N = int(input())
D, X = list(map(int, input().split()))

A = []
for i in range(N):
    a.append(input()) 

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

    
Total = X + B

print(Total)



Fixed submission:
N = int(input())
D, X = map(int, input().split())
A = []
for i in range(N):
    A.append(int(input()))
    
B=0
for i in range(N):
    B += 1 + (D-1)//A[i]

    
Total = X + B

print(Total)

Buggy python submission (verdict: Runtime Error):
#標準入力
N = int(input())
D, X = list(map(int, input().split()))

A = []
for i in range(N):
    a.append(input()) 

    
B=[]
for i in range(N):
    B[i] = 1 + A[i]//(D-1)
    
Total = X + sum(B)

print(Total)



Fixed submission:
N = int(input())
D, X = map(int, input().split())
A = []
for i in range(N):
    A.append(int(input()))
    
B=0
for i in range(N):
    B += 1 + (D-1)//A[i]

    
Total = X + B

print(Total)
Buggy python submission (verdict: Runtime Error):
N= int(input())
s = []
for i in range(N):
    s.append(input())

M= int(input())
t = []
for i in range(M):
    t.append(input())

    
max_count = 0
for i in range(N):
    for j in range(M):
        B = s.count(s[i]) - t.count(s[i])
        C = s.count(t[i]) - t.count(t[i])
        
        if B > C:
            E = B
        else:
            E = C
               
        if E > max_count:
            max_count = E
    
print(max_count)


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

if A + B >= C:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N= int(input())
s = list()
for i in range(N):
    s.append(input())

M= int(input())
t = list()
for i in range(M):
    t.append(input())

    
max_count = 0
for i in range(N):
    for j in range(M):
        B = s.count(s[i]) - t.count(s[i])
        C = s.count(t[i]) - t.count(t[i])
        
        if B > C:
            E = B
        else:
            E = C
               
        if E > max_count:
            max_count = E
    
print(max_count)


Fixed submission:
N= int(input())
s = list()
for i in range(N):
    s.append(input())

M= int(input())
t = list()
for i in range(M):
    t.append(input())

    
max_count = 0
for i in range(N):
    for j in range(M):
        B = s.count(s[i]) - t.count(s[i])
        C = s.count(t[j]) - t.count(t[j])
        
        if B > C:
            E = B
        else:
            E = C
               
        if E > max_count:
            max_count = E
    
print(max_count)

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

M= int(input())
t = []
for i in range(M):
    t.append(input())

    
max_count = 0
for i in range(N):
    for j in range(M):
        B = s.count(s[i]) - t.count(s[i])
        C = s.count(t[i]) - t.count(t[i])
        
        if B > C:
            E = B
        else:
            E = C
               
        if E > max_count:
            max_count = E
    
print(max_count)


Fixed submission:
N= int(input())
s = list()
for i in range(N):
    s.append(input())

M= int(input())
t = list()
for i in range(M):
    t.append(input())

    
max_count = 0
for i in range(N):
    for j in range(M):
        B = s.count(s[i]) - t.count(s[i])
        C = s.count(t[j]) - t.count(t[j])
        
        if B > C:
            E = B
        else:
            E = C
               
        if E > max_count:
            max_count = E
    
print(max_count)

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

M= int(input())
t = []
for i in range(M):
    s.append(input())

    
max_count = 0
for i in range(N):
    for j in range(M):
        B = s.count(s[i]) - t.count(s[i])
        C = s.count(t[i]) - t.count(t[i])
        
        if B > C:
            E = B
        else:
            E = C
               
        if E > max_count:
            max_count = E
    
print(max_count)
  


    
    


Fixed submission:
N= int(input())
s = list()
for i in range(N):
    s.append(input())

M= int(input())
t = list()
for i in range(M):
    t.append(input())

    
max_count = 0
for i in range(N):
    for j in range(M):
        B = s.count(s[i]) - t.count(s[i])
        C = s.count(t[j]) - t.count(t[j])
        
        if B > C:
            E = B
        else:
            E = C
               
        if E > max_count:
            max_count = E
    
print(max_count)
Buggy python submission (verdict: Runtime Error):
nums1 = list(map(int, input().split()))
nums2 = list(map(int, input().split()))
nums3 = list(map(int, input().split()))


print(nums1[0], nums2[1], nums3[2])

Fixed submission:
nums1 = input()
nums2 = input()
nums3 = input()


print(nums1[0]+nums2[1]+nums3[2])
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = [input() for i in range(N)]

COUNT = S.count("Y")

if COUNT > 0:
  print("Four")
else:
  print("Three")
    
    


Fixed submission:
N = int(input())
S = list(input().split())

COUNT = S.count("Y")

if COUNT > 0:
  print("Four")
else:
  print("Three")

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

COUNT = S.count("Y")

if COUNT > 0:
  print("Four")
else:
  print("Three")
    
    

Fixed submission:
N = int(input())
S = list(input().split())

COUNT = S.count("Y")

if COUNT > 0:
  print("Four")
else:
  print("Three")
Buggy python submission (verdict: Runtime Error):
#include<bits/stdc++.h>

using namespace std;
char a[15];
int main(){
    scanf("%s", a);
    int lsum = 0, sum = 0;
    for(int i = 0; i < strlen(a); i++){
        lsum += a[i] - '0';
        sum   = sum * 10 + a[i] - '0';
    }
    if(sum % lsum == 0) printf("Yes\n");
    else printf("No\n");
}


Fixed submission:
print(4 - 2 * input().count('-'))
Buggy python submission (verdict: Runtime Error):
#include<bits/stdc++.h>

using namespace std;
char a[15];
int main(){
    scanf("%s", a);
    int lsum = 0, sum = 0;
    for(int i = 0; i < strlen(a); i++){
        lsum += a[i] - '0';
        sum   = sum * 10 + a[i] - '0';
    }
    if(sum % lsum == 0) printf("Yes\n");
    else printf("No\n");
}


Fixed submission:
s = input()
print(['Yes', 'No'][int(s) % sum(map(int, s)) != 0])
Buggy python submission (verdict: Runtime Error):
w, h, x, y = map(int, input().split())

x1 = w - x
y1 = h - y

s = w * h / 2
s1 = x * h / 1
s2 = x1 * h / 1
s3 = y * w / 1 
s4 = y1 * w / 1

if s == s1:
	ans = s1
elif s == s2:
	ans = s2
elif s == s3:
	ans = s3
elif s == s4:
	ans = s4

cnt = 0

if s1 == ans:
	cnt += 1
if s2 == ans:
	cnt += 1
if s3 == ans:
	cnt += 1
if s4 == ans:
	cnt += 1

print(ans, end=" ")
if (cnt > 1):
	print(1)
else:
	print(0)



Fixed submission:
w, h, x, y = map(int, input().split())

cnt = 0
if x == w / 2 and y == h / 2:
	cnt = 1

print(w * h / 2, cnt)
Buggy python submission (verdict: Time Limit Exceeded):
n =int(input())
a =list(map(int, input().split()))

flg = True

s = []



for i in a:
    if i in s:
        flg = False
        break

    s.append(i)


        
if flg:
    print('YES')
else:
    print('NO')

Fixed submission:
def has_duplicates(seq):
    return len(seq) != len(set(seq))


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

flg = has_duplicates(a)

if not flg:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Time Limit Exceeded):
import math

n,k = map(int, input().split())
h = list(map(int, input().split()))

h.sort(reverse=True)

if n <= k:
    print(0)
else:
    for _ in range(k):
        h.pop(0)
    ans = sum(h)
    print(ans)

Fixed submission:
import math

n,k = map(int, input().split())
h = list(map(int, input().split()))

h.sort(reverse=True)

if n <= k:
    print(0)
else:
    x = n - k
    del h[0:k]
    ans = sum(h)
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import math

n,k = map(int, input().split())
h = list(map(int, input().split()))

h2 = sorted(h, reverse=True)

if n <= k:
    print(0)
else:
    for _ in range(k):
        h2.pop(0)
    ans = sum(h2)
    print(ans)

Fixed submission:
import math

n,k = map(int, input().split())
h = list(map(int, input().split()))

h.sort(reverse=True)

if n <= k:
    print(0)
else:
    x = n - k
    del h[0:k]
    ans = sum(h)
    print(ans)
Buggy python submission (verdict: Runtime Error):
A,B,C = map(int, input().split())

if A==B && B==C && A==C:
    print("No")

elif A!=B && B!=C && A!=C:
    print("No")

else :
    print("Yes")

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

if A==B and B==C and A==C:
    print("No")

elif A!=B and B!=C and A!=C:
    print("No")

else :
    print("Yes")
Buggy python submission (verdict: Runtime Error):
N = int(input())

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

for i in N:
    a=A[i]
    if a%2==0 and (a%3!=0 or a%5!=0):
        print("DENIED")
        break

print("APPROVED")

Fixed submission:
N = int(input())

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

n=0

for i in range(N):
    a=A[i]
    if a%2==0 and a%3!=0:
        if a%5!=0:
            n+=1

if n==0:
    print("APPROVED")
else:
    print("DENIED")
Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input()
A=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','t','u','v','w','x','y','z']
A=[i.upper() for i in A]
print(A)
S=list(S)
for i, a in enumerate(S):
    S[i]=A.index(a)+N
    if S[i]>26:
        S[i]=S[i]-26
    S[i]=A[S[i]]

print("".join(S))

Fixed submission:
N=int(input())
S=input()
A=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
A=[i.upper() for i in A]
##print(A)
S=list(S)
for i, a in enumerate(S):
    S[i]=A.index(a)+N
    if S[i]>25:
        S[i]=S[i]-26
    S[i]=A[S[i]]

print("".join(S))

Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input()
A=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','t','u','v','w','x','y','z']
A=[i.upper() for i in A]
print(A)
S=list(S)
for i, a in enumerate(S):
    S[i]=A.index(a)+N
    S[i]=A[S[i]]

print("".join(S))

Fixed submission:
N=int(input())
S=input()
A=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
A=[i.upper() for i in A]
##print(A)
S=list(S)
for i, a in enumerate(S):
    S[i]=A.index(a)+N
    if S[i]>25:
        S[i]=S[i]-26
    S[i]=A[S[i]]

print("".join(S))
Buggy python submission (verdict: Runtime Error):
import bisect
n = int(input())
 
l = list(map(int, input().split()))
l.sort()
a = 0
print(l)
for i in range(n):
    for j in range(i+1,n):
        s = bisect.bisect_left(l,l[i]+l[j])-j-1
        a+=s


print(a)

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

w = 0

if a<2*b :
    w = 0
    print(w)

else:
    w = a-2*b
    print(w)
Buggy python submission (verdict: Runtime Error):
import bisect
n = int(input())
 
l = list(map(int, input().split()))
l.sort()
a = 0
 
for i in range(n-2):
    for j in range(i+1,n-1):
        s = bisect.bisect_left(l[i]+l[j])
        a =a + n - s+1


print(a)

Fixed submission:
import bisect
n = int(input())
 
l = list(map(int, input().split()))
l.sort()
a = 0
#print(l)
for i in range(n-2):
    for j in range(i+1,n-1):
        s = bisect.bisect_left(l,l[i]+l[j])-j-1
        a+=s


print(a)

Buggy python submission (verdict: Runtime Error):
import bisect
n = int(input())
 
l = list(map(int, input().split()))
l.sort()
a = 0
 
for i in range(n-2):
    for j in range(i+1,n-1):
        s = bisect.bisect_left(l[i]+l[j])
        a += n-s-1 


print(a)

Fixed submission:
import bisect
n = int(input())
 
l = list(map(int, input().split()))
l.sort()
a = 0
#print(l)
for i in range(n-2):
    for j in range(i+1,n-1):
        s = bisect.bisect_left(l,l[i]+l[j])-j-1
        a+=s


print(a)

Buggy python submission (verdict: Runtime Error):
import bisect
n = int(input())
 
l = list(map(int, input().split()))
l.sort()
a = 0
 
for i in range(len(l)-2):
    for j in range(i+1,len(l)-1):
        s = bisect.bisect_left(l[i]+l[j])
        a += n-s-1 


print(a)

Fixed submission:
import bisect
n = int(input())
 
l = list(map(int, input().split()))
l.sort()
a = 0
#print(l)
for i in range(n-2):
    for j in range(i+1,n-1):
        s = bisect.bisect_left(l,l[i]+l[j])-j-1
        a+=s


print(a)

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

l = list(map(int, input().split()))

a = 0

for i in range(len(l)):
    for j in range(i+1,len(l)):
        if j > l[i]+l[j]]:
            a+=1
        

print(a)

Fixed submission:
import bisect
n = int(input())
 
l = list(map(int, input().split()))
l.sort()
a = 0
#print(l)
for i in range(n-2):
    for j in range(i+1,n-1):
        s = bisect.bisect_left(l,l[i]+l[j])-j-1
        a+=s


print(a)

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

l = list(map(int, input().split()))

a = 0

for i in range(len(l)):
    for j in range(i+1,len(l)):
        a = a + int(len([for k in l if i > l[i]+l[j]]))
        

print(a)

Fixed submission:
import bisect
n = int(input())
 
l = list(map(int, input().split()))
l.sort()
a = 0
#print(l)
for i in range(n-2):
    for j in range(i+1,n-1):
        s = bisect.bisect_left(l,l[i]+l[j])-j-1
        a+=s


print(a)

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

l = list(map(int, input().split()))

a = 0

for i in range(len(l)):
    for j in range(i+1,len(l)):
        a = a + int(len(for k in l if i > l[i]+l[j]))
        

print(a)

Fixed submission:
import bisect
n = int(input())
 
l = list(map(int, input().split()))
l.sort()
a = 0
#print(l)
for i in range(n-2):
    for j in range(i+1,n-1):
        s = bisect.bisect_left(l,l[i]+l[j])-j-1
        a+=s


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

h = list(map(int(input().split())))

ans = 0
for i in h:
    if i>=K:
        ans+=1

print(ans)

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

h = list(map(int,(input().split())))

ans = 0
for i in h:
    if i>=K:
        ans+=1


print(ans)

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

h = list(map(int(input().split())))

ans = 0
for i in h:
    if i>=K:
        ans+=1

print(ans)


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

h = list(map(int,(input().split())))

ans = 0
for i in h:
    if i>=K:
        ans+=1


print(ans)

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

h = list(map(int(input().split())))

ans = 0
[ans+= for i in h if i>=50]

print(ans)


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

h = list(map(int,(input().split())))

ans = 0
for i in h:
    if i>=K:
        ans+=1


print(ans)