Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())

def main():
    ans = 1
    t = 0
    while t < N:
        t += 1
        ans *= t
        ans %= 1_000_000_007
    print(ans)

if __name__ == '__main__':
    main()

Fixed submission:
N = int(input())

def main():
    ans = 1
    t = 0
    while t < N:
        t += 1
        ans *= t
        ans %= 1000000007
    print(ans)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(n) for n in input().split()]

def main():
    counts = [A.count(i) for i in set(A)]
    even = [c for c in counts if c % 2 == 0]
    ans = len(counts) if len(even) % 2 == 0 else len(counts) - 1
    print(ans)

if __name__ == '__main__':
    main()

Fixed submission:
N = int(input())
A = {}
for s in input().split():
    n = int(s)
    if n in A:
        A[n] += 1
    else:
        A[n] = 1

def main():
    a_len = len(A.keys())
    counts = A.values()
    even = [c for c in counts if c % 2 == 0]
    ans = a_len if len(even) % 2 == 0 else a_len - 1
    print(ans)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
K, S = [int(n) for n in input().split()]

def main():
    ns = set()
    for x in range(K + 1):
        for y in range(x + 1):
            z = S - x - y
            if z < 0:
                continue
            if K < z:
                continue
            t = tuple(sorted([x, y, z]))
            ns.add(t)

    ans = 0
    for t in ns:
        x = t[0]
        y = t[1]
        z = t[2]
        if x == y == z:
            ans += 1
        elif x != y != z:
            ans += 6
        else:
            ans += 3
    print(ans)

if __name__ == '__main__':
    main()

Fixed submission:
K, S = [int(n) for n in input().split()]

def main():

    ans = 0
    for x in range(K + 1):
        for y in range(x + 1):
            z = S - x - y
            if z < 0 or\
                K < z or\
                x < z or\
                y < z:
                continue
            if x == y == z:
                ans += 1
            elif x != y != z:
                ans += 6
            else:
                ans += 3
    print(ans)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):

h,w,a,b=list(map(int,input().split())

for i in range(1,h+1):
    if i<=b:
        s="1"*a+"0"*(w-a)
    else:
        s="0"*a+"1"*(w-a)
    print(s)




Fixed submission:

h,w,a,b=list(map(int,input().split()))

ans=""

for i in range(1,h+1):
    if i<=b:
        s="1"*a+"0"*(w-a)
    else:
        s="0"*a+"1"*(w-a)
    ans+=s+"\n"
print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
l,r=map(int,sys.stdin.readline().split())
r_m=r%2019
l_m=l%2019
min=2019
if r-l>2019-r_m:
    print(0)
else:
    retu=range(l_m,r_m+1)

    for i in range(len(retu)):
        for j in range(i+1,len(retu)):
            s=retu[i]*retu[j]%2019
            if s<min:
                min=s
print(min)


Fixed submission:
import sys
a,b,c=map(int,sys.stdin.readline().split())
print(min(a*b,c))
Buggy python submission (verdict: Runtime Error):
import sys
import math
N,D=map(int,sys.stdin.readline().split())
x=[]
count=0
for i in range(N):
    x.append(map(int,sys.stdin.readline().split()))
for i in range(N):
    for j in range(n-1):
        if j>=i:
            k=j+1
        else:
            k=j
        diff=math.sqrt(sum([(a-b)**2 for a,b in x[i],x[k]]))
        if diff-int(diff)==0:
            count+=1
print(count)


Fixed submission:
import sys
import math
N,D=map(int,sys.stdin.readline().split())
x=[]
count=0
for i in range(N):
    x.append(list(map(int,sys.stdin.readline().split())))

for i in range(N):
    for j in range(i+1,N):

        diff=math.sqrt(sum([(a-b)**2 for a,b in zip(x[i],x[j])]))

        if diff-int(diff)==0:
            count+=1
print(count)
Buggy python submission (verdict: Runtime Error):

N,K = map(int,input().split(' '))
MOD = 10**9 + 7

n = N-K+1
print(n)
for i in range(2,K+1):
	n = (n * (N-K+2-i) * (K-i+1) // (i * (i-1)))
	print(n % MOD)


Fixed submission:

s=input()
dic={}
for i in range(4):
    if s[i] in dic.keys():
        dic[s[i]]+=1
    else:
        dic[s[i]]=1
ans=0
for i in range(4):
    if dic[s[i]]!=2:
        ans=1
if ans==0:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):

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

maxi=min(k,n-k+1)
q=[]
q.append(n-k+1)
c1=n-k+1
c2=1

for i in range(2,maxi+1):

    c1*=(n-k+i)/i
    c2*=(k-i+1)/(i-1)
    q.append(int((c1-sum(q))*c2))
for i in q:
    print(i%(10**9+7))


Fixed submission:

N,K = map(int,input().split(' '))
MOD = 10**9 + 7

n = N-K+1
print(n)
for i in range(2,K+1):
	n = (n * (N-K+2-i) * (K-i+1) // (i * (i-1)))
	print(n % MOD)
Buggy python submission (verdict: Runtime Error):
x=int(input())
a=int(input())
if x<a:
  print(0)
else:
  print(10)

Fixed submission:
x,a=map(int,input().split())
if x<a:
  print(0)
else:
  print(10)
Buggy python submission (verdict: Runtime Error):
a = input()
a = int(a)

b = input()
b = int(b)

c = a * b

if c % == 2:
  print("Even")
else:
  print("Odd")
    

Fixed submission:
a, b = map(int, input().split())
if (a*b)%2 == 1:
  print("Odd")
else:
  print("Even")
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n == 1: 
    print (1)
elif n % 2 == 0:
    print(0.5)
else
    print((n+1)/2*n)


Fixed submission:
n = int(input())
if n == 1: 
    print (1)
elif n % 2 == 0:
    print(0.5)
else:
    print((n+1)/(2*n))
Buggy python submission (verdict: Runtime Error):
a, b, t = input().split()
t = t + 0.5
o = 0

while t > 0:
	t = t - a
    o = o + b

print(o)

Fixed submission:
a, b, t = map(int, input().split())
n = int((t + 0.5) // a)
print(n * b)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split(' '))

if a >= 1 and a <= 9 and b >= 1 and b <= 9:
    print('Yes')
else:
    print('No')

Fixed submission:
import sys

a = int(input())

for i in range(9):
    for j in range(9):
        if a == (i+1) * (j+1):
            print('Yes')
            sys.exit()
            
print('No')
Buggy python submission (verdict: Time Limit Exceeded):
# N 参加人数
# K 開始時のポイント
#
# 0以下で敗退



N, K, Q = map(int, input().split(" "))
persons = list()

for i in range(N):
    persons.append(K)

for i in range(Q):
    a = int(input())
    for j in range(N):
        if a != j:
            persons[j-1] -= 1

for person in persons:
    if person <= 0:
        print("No")
    else:
        print("Yes")


Fixed submission:
N, K, Q = map(int, input().split(" "))
persons = [K-Q] * N

for i in range(Q):
    a = int(input())
    persons[a-1] += 1

for person in persons:
    if person <= 0:
        print("No")
    else:
        print("Yes")

Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split(" "))
persons = list()

for i in range(N):
    persons.append(K)

for i in range(Q):
    a = int(input())
    for j in range(N):
        if a != j:
            persons[j-1] -= 1

for person in persons:
    if person <= 0:
        print("No")
    else:
        print("Yes")


Fixed submission:
N, K, Q = map(int, input().split(" "))
persons = [K-Q] * N

for i in range(Q):
    a = int(input())
    persons[a-1] += 1

for person in persons:
    if person <= 0:
        print("No")
    else:
        print("Yes")
Buggy python submission (verdict: Runtime Error):
a = 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):
import numpy as np

l, n = [i for i in input().split(' ')]

nl = np.array([i for i in range(n)]) + 1
ll = nl + l - 1

mini = ll.index(min(abs(ll)))
lll = ll.pop(mini)

print(sum(lll))

Fixed submission:
inp = input()
if inp[0] == inp[1]:
   print('Bad')
elif inp[1] == inp[2]:
   print('Bad')
elif inp[2] == inp[3]:
   print('Bad')
else:
   print('Good')
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = list(str(input()))
l = [0]
for i in s:
  if l[0]!=i:
    l.insert(0,i)
print(len(l)-1)

Fixed submission:
n = int(input())
s = str(input())
count = 1
for i in range(n-1):
  if s[i]!=s[i+1]:
    count+=1
print(count)
Buggy python submission (verdict: Runtime Error):
s, n = map(int,input().split())

a = input()
b = input()
c = input()
ar = [a,b,c]
ar.sort()
result = ''.join(ar)

print(result)

Fixed submission:
a = input()

if (a.count("5") == 2 and a.count("7") == 1):
  print("YES")
  
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
sep = []
for i in range(1,int(math.sqrt(n))):
  if(n%i == 0):
    sep.append(i+int(n/i)-2)
sep.sort()
print(sep[0])

Fixed submission:
import math
n = int(input())
sep = []
for i in range(1,int(math.sqrt(n)+1)):
  if(n%i == 0):
    sep.append(i+int(n/i)-2)
sep.sort()
print(sep[0])
Buggy python submission (verdict: Runtime Error):
n=[int(i) for i in input().split()]
array=[]
for i in range(n[0]):
  array.append(n[1])
for i in range(n[2]):
  array[int(input())-1]+=1
for i in range(n[2]):
  for i in range(n[0]):
    array[i]-=n[2]
	if(array[i]<=0):
      print("No")
    else:
      print("Yes")

Fixed submission:
n=[int(i) for i in input().split()]
array=[]
for i in range(n[0]):
  array.append(n[1])
for i in range(n[2]):
  array[int(input())-1]+=1
for i in range(n[0]):
  array[i]-=n[2]
  if(array[i]<=0):
    print("No")
  else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
if(int(input())<3200)print("red")
else print(input())

Fixed submission:
if(int(input())<3200):print("red")
else:print(input())
Buggy python submission (verdict: Runtime Error):
n=[int(i) for i in input().split()]
array=[]
abs_array=[]
for i in range(n[0]):
  array.append(n[1]+i-1)
  abs_array.append(abs(n[1]+i-1))
abs_array=abs_array.sort()
if(abs_array[0] in array == True):
  print(sum(array)-abs_array[0])
else:
  print(sum(array)+abs_array[0])

Fixed submission:
n=[int(i) for i in input().split()]
array=[]
abs_array=[]
for i in range(1,n[0]+1):
  array.append(n[1]+i-1)
  abs_array.append(abs(n[1]+i-1))
abs_array.sort()
if abs_array[0] in array :
  print(sum(array)-abs_array[0])
else:
  print(sum(array)+abs_array[0])
Buggy python submission (verdict: Runtime Error):
n=[int(i) for i in input().split]
if(n[0]>=n[1]):
  print(10)
else:
  print(0)

Fixed submission:
n=[int(i) for i in input().split()]
if(n[0]>=n[1]):
  print(10)
else:
  print(0)

Buggy python submission (verdict: Runtime Error):
if(int(input())<=int(input())):print(10)
else:print(0)

Fixed submission:
n=[int(i) for i in input().split()]
if(n[0]>=n[1]):
  print(10)
else:
  print(0)

Buggy python submission (verdict: Runtime Error):
if(input()<=input()):print(10)
else:print(0)

Fixed submission:
n=[int(i) for i in input().split()]
if(n[0]>=n[1]):
  print(10)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
n=[int(i) for i in input().split]
n.sort()
print(n[0]+n[1])

Fixed submission:
n=[int(i) for i in input().split()]
n.sort()
print(n[0]+n[1])
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
d=[int(i) for i in input().split()]
print(int(answer=(d[0]*3+d[1])/2))


Fixed submission:
#coding:utf-8
d=[int(i) for i in input().split()]
print(int((d[0]*3+d[1])/2))
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
s=[int(i) for i in input().split()]
n=[]
for i in range(s[0]):
  n.append(int(input()))
n.sort()
sa=abs(n[0]-n[s[1]]-1)
for i in range(s[1]):
  print(n[1],n[i+s[1]-1])
  if(sa>abs(n[i]-n[i+s[1]-1])):
    sa=abs(n[i]-n[i+s[1]-1])
print(sa)

Fixed submission:
n=int(input())
if(n==25):
  print("Christmas")
elif(n==24):
  print("Christmas Eve")
elif(n==23):
  print("Christmas Eve Eve")
elif(n==22):
  print("Christmas Eve Eve Eve")

Buggy python submission (verdict: Runtime Error):
n=int(input())
if(n==25):
  print("Christmas")
elif(n=24):
  print("Christmas Eve")
elif(n=23):
  print("Christmas Eve Eve")
elif(n==22):
  print("Christmas Eve Eve Eve")

Fixed submission:
n=int(input())
if(n==25):
  print("Christmas")
elif(n==24):
  print("Christmas Eve")
elif(n==23):
  print("Christmas Eve Eve")
elif(n==22):
  print("Christmas Eve Eve Eve")
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
s=[int(i) for i in input().split()]
n=[]
for i in range(s[0]):
  n.append(int(input()))
n.sort()
sa=abs(n[0]-n[s[1]]-1)
for i in range(s[1]):
  print(n[1],n[i+s[1]-1])
  if(sa>abs(n[i]-n[i+s[1]-1])):
    sa=abs(n[i]-n[i+s[1]-1])
print(sa)

Fixed submission:
n=[int(i) for i in input().split()]
array=[]
for i in range(n[0]):
  array.append(int(input()))
array.sort()
ans=abs(array[0]-array[n[1]-1])
for i in range(n[0]-(n[1]-1)):
  if(ans>abs(array[i]-array[i+n[1]-1])):
    ans=abs(array[i]-array[i+n[1]-1])
print(ans)

Buggy python submission (verdict: Runtime Error):
#coding:utf-8
s=[int(i) for i in input().split()]
n=[]
for i in range(s[0]):
  n.append(int(input()))
n.sort()
print(n)
sa=abs(n[0]-n[s[1]]-1)
for i in range(s[1]):
  print(n[1],n[i+s[1]-1])
  if(sa>abs(n[i]-n[i+s[1]-1])):
    sa=abs(n[i]-n[i+s[1]-1])
print(sa)

Fixed submission:
n=[int(i) for i in input().split()]
array=[]
for i in range(n[0]):
  array.append(int(input()))
array.sort()
ans=abs(array[0]-array[n[1]-1])
for i in range(n[0]-(n[1]-1)):
  if(ans>abs(array[i]-array[i+n[1]-1])):
    ans=abs(array[i]-array[i+n[1]-1])
print(ans)

Buggy python submission (verdict: Runtime Error):
#coding:utf-8
s=[int(i) for i in input().split()]
n=[]
for i in range(s[0]):
  n.append(int(input()))
n.sort()
sa=abs(n[0]-n[s[1]]-1)
for i in range(s[1]-1):
  if(sa>abs(n[i]-n[i+s[1]-1])):
    sa=abs(n[i]-n[i+s[1]-1])
print(sa)

Fixed submission:
n=[int(i) for i in input().split()]
array=[]
for i in range(n[0]):
  array.append(int(input()))
array.sort()
ans=abs(array[0]-array[n[1]-1])
for i in range(n[0]-(n[1]-1)):
  if(ans>abs(array[i]-array[i+n[1]-1])):
    ans=abs(array[i]-array[i+n[1]-1])
print(ans)
Buggy python submission (verdict: Runtime Error):
n=[int i for i in input.split()]
print(n[0]+n[1]/2)

Fixed submission:
n=[int(i) for i in input().split()]
print(int(n[0]+n[1]/2))

Buggy python submission (verdict: Runtime Error):
n=[int(i) for i in input.split()]
print(n[0]+n[1]/2)

Fixed submission:
n=[int(i) for i in input().split()]
print(int(n[0]+n[1]/2))
Buggy python submission (verdict: Runtime Error):
#include<iostream>
using namespace std;
int main(void){
  int a,b;
  cin>>a>>b;
  if(a*b%2==0){
    cout<<"No"<<endl;
  }
  else{
    cout<<"Yes"<<endl;
  }
  return 0;
}


Fixed submission:
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[0]*n[1]%2==0):
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
n=int(input())
k=int(input())
j=0
for i in range(100,-1,-1):
  if(int(n%pow(10,i))==0):
  else:
    s.append(int(n%pow(10,i)))
    n-=s[j]
    j+=1
if(s[0]=1):
  print(s[1])
else:
  print(s[0])

Fixed submission:
#coding:utf-8
n=input()
count=0
l=int(input())
for i in range(len(n)):
  if(n[i]=='1'):
    count+=1
    if(l==count):
      print(n[i])
      break;
    continue
  else:
    print(n[i])
    break;
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[0]%n[1]=0):
  print(0)
else:
  print(1)

Fixed submission:
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[0]%n[1]==0):
  print(0)
else:
  print(1)
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
n=[int(i) for i in input().split()]
Ad=0
Au=0
A=[int(i) for i in input().split()]
for i in range(n[1]):
  if(A[i]>n[3]):
    Au+=1
  else:
    Ad+=1
if(Au>=Ad):
  print(Ad)
else:
  print(Au)
  

Fixed submission:
#coding:utf-8
n=[int(i) for i in input().split()]
Ad=0
Au=0
A=[int(i) for i in input().split()]
for i in range(n[1]):
  if(A[i]>n[2]):
    Au+=1
  else:
    Ad+=1
if(Au>=Ad):
  print(Ad)
else:
  print(Au)
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[1]-n[0]+1<=2*n[2]):
  for i in range(n[0],n[1]+1):
    print(i)
else:
  for j in range(n[0],n[0]+n[2]):
    print(j)
  for k in range(n[1]-n[2]+1,n[1]+1):
    print(k)


Fixed submission:
#coding utf-8
s=input()
s1=[s[0],s[1],s[2]]
s1.sort()
s1=s1[0]+s1[1]+s1[2]
if(s1!='abc'):
  print("No")
else:
  print("Yes")

Buggy python submission (verdict: Runtime Error):
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[1]-n[0]<=2*n[2]):
  for i in range(n[0],n[1]+1):
    print(i)
else:
  for j in range(n[0],n[0]+n[2]+1):
    print(j)
  for k in range(n[1]-n[2]+1,n[1]+1):
    print(k)


Fixed submission:
#coding utf-8
s=input()
s1=[s[0],s[1],s[2]]
s1.sort()
s1=s1[0]+s1[1]+s1[2]
if(s1!='abc'):
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[1]-n[0]<=2*n[2]):
  for i in range(n[0],n[1]):
    print(i)
else:
  for j in range(n[0],n[0]+n[2]):
    print(j)
  for k jn range(n[1]-n[2]+1,n[1]):
    print(k)

Fixed submission:
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[1]-n[0]+1<=2*n[2]):
  for i in range(n[0],n[1]+1):
    print(i)
else:
  for j in range(n[0],n[0]+n[2]):
    print(j)
  for k in range(n[1]-n[2]+1,n[1]+1):
    print(k)

Buggy python submission (verdict: Runtime Error):
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[1]-n[0]<=2*n[2]):
  for i in range(n[0],n[1]):
    print(i)
else:
  for i in range(n[0],n[0]+n[2]):
    print(i)
  for i jn range(n[1]-n[2]+1,n[1]):
    print(i)

Fixed submission:
#coding:utf-8
n=[int(i) for i in input().split()]
if(n[1]-n[0]+1<=2*n[2]):
  for i in range(n[0],n[1]+1):
    print(i)
else:
  for j in range(n[0],n[0]+n[2]):
    print(j)
  for k in range(n[1]-n[2]+1,n[1]+1):
    print(k)
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
n=[int(i) for i in input().split()]
d=n[1]
for i in range(2,-1,-1):
  if(d%int(pow(10,i))>=1):
    count=i
    break
n[0]=n[0]*int(pow(10,count))+n[1]
if(pow(n[0],1/2)==int(pow(n[0],1/2))):
  print("Yes")
else:
  print("No")

Fixed submission:
#coding:utf-8
n=[int(i) for i in input().split()]
d=n[1]
for i in range(2,-1,-1):
  if(d/pow(10,i)>=1):
    count=i
    break
n[0]=n[0]*int(pow(10,count+1))+n[1]
if(pow(n[0],1/2)==int(pow(n[0],1/2))):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
s=input()
s.replace(2017,2018)
print(s)

Fixed submission:
#coding:utf-8
s=input()
s=s.replace('2017','2018')
print(s)
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
n1=str(input())
n2=str(input())
if(n1[0]==n2[2] and n1[2]==n2[0]):
  if(n1[1]==n2[1]):
    print("YES")
  else:
    print("NO)
else:print("NO")

Fixed submission:
#coding:utf-8
n1=str(input())
n2=str(input())
if(n1[0]==n2[2] and n1[2]==n2[0]):
  if(n1[1]==n2[1]):
    print("YES")
  else:
    print("NO")
else:print("NO")

Buggy python submission (verdict: Runtime Error):
#coding:utf-8
n1=str(input())
n2=str(input())
if(n1[0]==n2[2] and n1[2]==n2[0]　and n1[1]==n2[1]):
  print("YES")
else:print("NO")


Fixed submission:
#coding:utf-8
n1=str(input())
n2=str(input())
if(n1[0]==n2[2] and n1[2]==n2[0]):
  if(n1[1]==n2[1]):
    print("YES")
  else:
    print("NO")
else:print("NO")

Buggy python submission (verdict: Runtime Error):
#coding:utf-8
n1=input()
n2=input()
if(n1[0]==n2[2] & n1[2]==n2[0]):
  print("YES")
else:print("NO")

Fixed submission:
#coding:utf-8
n1=str(input())
n2=str(input())
if(n1[0]==n2[2] and n1[2]==n2[0]):
  if(n1[1]==n2[1]):
    print("YES")
  else:
    print("NO")
else:print("NO")
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
n=[int(i) for i in input().split()]
n1=n[1]*2-n[0]
print(n1)

Fixed submission:
#coding:utf-8
n=[]
for i in range(2):
  n.append(int(input()))
n1=n[1]*2-n[0]
print(n1)
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
n=[a,i,u,e,o]
c=input()
if(c in n):
  print("vowel")
else:
  print("consonant")

Fixed submission:
#coding:utf-8
n=['a','i','u','e','o']
c=input()
if(c in n):
  print("vowel")
else:
  print("consonant")
Buggy python submission (verdict: Runtime Error):
a, b = list(map(int, input()))
if a >= 10 or b >= 10:
	print(-1)
else:
	print(a*b)

Fixed submission:
a, b = list(map(int, input().split()))
if a >= 10 or b >= 10:
    print(-1)
else:
    print(a*b)
Buggy python submission (verdict: Runtime Error):
n = int(input())
d = list(map(int, input().split()))
ans = 0
for i in range(len(d)):
  for j in range(len(d)-i):
    if i == j:
      continue
   	ans += d[i] * d[j]
print(ans)

Fixed submission:
n = int(input())
d = list(map(int, input().split()))
ans = 0
for i in range(len(d)):
    for j in range(i + 1, len(d)):
        if i == j:
            continue
        ans += d[i] * d[j]
print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input())
v = [int(i) for i in input().split()]
v.sort()
for i in range(n): 
  v1 = v.pop(-1)
  v2 = v.pop(-1)
  v3 = (v1 + v2) / 2
  v.append(v3)
  v.sort()
print(v[0])
  
  


Fixed submission:

n = int(input())
v = [int(i) for i in input().split()]
v.sort()
v1 = v.pop(0)
for i in range(n-1): 
  v2 = v.pop(0)
  v1 = (v1 + v2) / 2
print(v1)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n = int(input())
ll = [Counter(input()) for _ in range(n)]
c = 0
for i, s in enumerate(ll):
    c += len([j for j in range(i + 1, n) if s == ll[j]])
print(c)

Fixed submission:
from collections import Counter
import numpy as np
n = int(input())
ll = []
ans = 0
for _ in range(n):
    c = list(input())
    c.sort()
    ll.append("".join(c))
ans = np.sum([np.arange(v).sum() for v in Counter(ll).values() if v > 1])
print(int(ans))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = []
for _ in range(n):
    s = list(input())
    s.sort()
    l.append("".join(s))
c = 0
for i, s in enumerate(l[:-1]):
    c += len([j for j in range(i + 1, n) if s == l[j]])
print(c)

Fixed submission:
from collections import Counter
import numpy as np
n = int(input())
ll = []
ans = 0
for _ in range(n):
    c = list(input())
    c.sort()
    ll.append("".join(c))
ans = np.sum([np.arange(v).sum() for v in Counter(ll).values() if v > 1])
print(int(ans))