Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N = input()
P = list(map(int, input().split()))
count = 0

for i in range(int(N)):
    if P[i] ==(min(P[:i+1])):
            count = count + 1
print(count)

Fixed submission:
N = input()
P = list(map(int, input().split()))
count = 0

now_mini= 1<<20
for i in P:
    if i < now_mini:
        count = count + 1
        now_mini=i
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N = input()
P = list(map(int, input().split()))
count = 1

for i in range(int(N)-1):
    if P[i+1]<=(min(P[:i+1])):
            count = count + 1
print(count)
            

Fixed submission:
N = input()
P = list(map(int, input().split()))
count = 0

now_mini= 1<<20
for i in P:
    if i < now_mini:
        count = count + 1
        now_mini=i
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N = input()
P = list(map(int, input().split()))
count = 0

for i in range(int(N)):
    temp = 0
    if i == 0:
        if P[i]<=(min(P[:i+1])):
            count = count + 1
    else:
        if P[i]<=min(P[:i]):
            count = count + 1
print(count)

Fixed submission:
N = input()
P = list(map(int, input().split()))
count = 0

now_mini= 1<<20
for i in P:
    if i < now_mini:
        count = count + 1
        now_mini=i
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N = input()
P = list(map(int, input().split()))
count = 0

for i in range(int(N)):
    temp = 0
    P2 = P[:i+1]
    P3 = P[:i]
    if i == 0:
        if P[i]<=(min(P2)):
            count = count + 1
    else:
        if P[i]<=min(P3):
            count = count + 1
print(count)
            

Fixed submission:
N = input()
P = list(map(int, input().split()))
count = 0

now_mini= 1<<20
for i in P:
    if i < now_mini:
        count = count + 1
        now_mini=i
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N = input()
P = list(map(int, input().split()))
count = 0
for i in range(int(N)):
    temp = 0
    for j in range(i+1):

        if P[i] <= P[j]:
            temp = temp + 1
        else:
            temp =0
    if temp == j+1:
        count = count + 1
print(count)
            

Fixed submission:
N = input()
P = list(map(int, input().split()))
count = 0

now_mini= 1<<20
for i in P:
    if i < now_mini:
        count = count + 1
        now_mini=i
print(count)
Buggy python submission (verdict: Runtime Error):
num_bars = 3
length_list = list(map(int,input().split()))

x = abs(length_list[0])
k = length_list[1]
d = length_list[2]

amari =  x % d
syou = x // d

#print(amari)
#print(syou)

val = x

if x - k * d > amari:
  val = x - k * d
elif (k - syou ) % 2 == 0:
  val = amari
else :
  val = d - amari
  
  
print(val)
  
  

Fixed submission:
s = input()
num = 0
num2 = 0
for i in range (3) :
#  print(s[i])

  yesterday = 'R'
  if s[i] == 'R':
    if yesterday == 'R':
      num2 += 1
    else :
      yesterday = 'R'
  else :
    yesterday = 'S'
    if num2 > num:
      num = num2
      num2 = 0


if num2 > num:
  num = num2


print(num)

Buggy python submission (verdict: Runtime Error):
num_bars = int(input())
length_list = list(map(int,input().split()))
length_list.sort()
#print(length_list)

count = 0

for i in range(num_bars):
  a = length_list[i]
  for j in range(i + 1,num_bars):
    b = length_list[j]
    if a == b:
      continue
    else :
      for k in range(j + 1,num_bars):
        c = length_list[k]
        if b == c:
          continue
        if a + b <= c:
          continue
        count += 1

        
print(count)
        
#  for j in 


Fixed submission:
s = input()
num = 0
num2 = 0
for i in range (3) :
#  print(s[i])

  yesterday = 'R'
  if s[i] == 'R':
    if yesterday == 'R':
      num2 += 1
    else :
      yesterday = 'R'
  else :
    yesterday = 'S'
    if num2 > num:
      num = num2
      num2 = 0


if num2 > num:
  num = num2


print(num)
Buggy python submission (verdict: Runtime Error):

N = int(input())
if N%1000 == 0:
  print(0)
else:


Fixed submission:
N = int(input())
if N%1000 == 0:
  print('0')
else:
  print(-1*(N%1000-1000))
Buggy python submission (verdict: Runtime Error):
X,Y = map(int,input().split())
if 2*X == Y or 4*X == Y or 3*X == Y or Y%X ==1 or Y%X == 2:
  print('Yes')
else:
  print('No')

Fixed submission:
a,b,c,d,e = map(int,input().split())
if a == 0 :
  print('1')
elif b == 0 :
  print('2')
elif c == 0 :
  print('3')
elif d == 0 :
  print('4')  
else:
  print('5')
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = sorted(map(int, input().split()))
ans = N-sum(A)
if = N-sum(A) >= 0:
  print(ans)
else:
  print('-1')

Fixed submission:
N,M = map(int,input().split())
A = sorted(map(int, input().split()))
ans = N-sum(A)
if N-sum(A) >= 0:
  print(ans)
else:
  print('-1')

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = sorted(map(int, input().split()))
ans = sum(A)-N
if = sum(A)-N >= 0:
  print(ans)
else:
  print('-1')
  

Fixed submission:
N,M = map(int,input().split())
A = sorted(map(int, input().split()))
ans = N-sum(A)
if N-sum(A) >= 0:
  print(ans)
else:
  print('-1')
Buggy python submission (verdict: Runtime Error):
S= input()
if S[0::] = S[::-1]
  print(Yes)
else
  print(No)

Fixed submission:
S = input()
N = len(S)
if S == S[::-1] and  S[:(N-1)//2] == S[(N-3)//2::-1] and S[(N+1)//2:] == S[:(N-1)//2:-1] :
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
S= input()
if S[0::] = S[::-1]
  print(Yes)
else
  print(No)

Fixed submission:
S = input()
N = len(S)
if S == S[::-1] and  S[:(N-1)//2] == S[(N-3)//2::-1] and S[(N+1)//2:] == S[:(N-1)//2:-1] :
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
N=int(input())
ans=[0 for _ in range(10000)]
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            v=x**2+y**2+z**2+x*y+y*z+z*x
            if v<10050:
                ans[v]+=1

for i in range(N):
    print(ans[i])

Fixed submission:
N=int(input())
ans=[0 for _ in range(10050)]
for x in range(1,105):
    for y in range(1,105):
        for z in range(1,105):
            v=x**2+y**2+z**2+x*y+y*z+z*x
            if v<10050:
                ans[v]+=1

for i in range(N):
    print(ans[i+1])

Buggy python submission (verdict: Time Limit Exceeded):
def f(num):
    ans=0
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                if x==y==z and x**2+y**2+z**2+x*y+y*z+z*x==num:
                    ans+=1
                    return ans
                elif x**2+y**2+z**2+x*y+y*z+z*x==num:
                    ans+=3
                    return ans
    return ans

N=int(input())
for i in range(N):
    print(f(i+1))

Fixed submission:
N=int(input())
ans=[0 for _ in range(10050)]
for x in range(1,105):
    for y in range(1,105):
        for z in range(1,105):
            v=x**2+y**2+z**2+x*y+y*z+z*x
            if v<10050:
                ans[v]+=1

for i in range(N):
    print(ans[i+1])

Buggy python submission (verdict: Time Limit Exceeded):
def f(num):
    ans=0
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                if x**2+y**2+z**2+x*y+y*z+z*x==num:
                    ans+=1
    return ans

N=int(input())
for i in range(N):
    print(f(i+1))

Fixed submission:
N=int(input())
ans=[0 for _ in range(10050)]
for x in range(1,105):
    for y in range(1,105):
        for z in range(1,105):
            v=x**2+y**2+z**2+x*y+y*z+z*x
            if v<10050:
                ans[v]+=1

for i in range(N):
    print(ans[i+1])
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = list(map(int, input().split()))  

dai=[0, 0, 0, 0, 0]
for i, l in enumerate(B):
  if i==0:
    continue
  if B[i-1]-B[i]>0:
    dai[i]=B[i-1]-B[i]
    B[i]+=B[i-1]-B[i]

print(sum(dai))
  

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

dai=[0 for _ in range(A)]

for i, l in enumerate(B):
  if i==0:
    continue
  if B[i-1]-B[i]>0:
    dai[i]=B[i-1]-B[i]
    B[i]+=B[i-1]-B[i]

print(sum(dai))

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

dai=[0, 0, 0, 0, 0]
for i, l in enumerate(B):
  if i==0:
    continue
  if B[i-1]-B[i]>0:
    dai[i]=B[i-1]-B[i]
    
print(sum(dai))

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

dai=[0 for _ in range(A)]

for i, l in enumerate(B):
  if i==0:
    continue
  if B[i-1]-B[i]>0:
    dai[i]=B[i-1]-B[i]
    B[i]+=B[i-1]-B[i]

print(sum(dai))

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

dai=[0, 0, 0, 0, 0]
for i, l in enumerate(B):
  if i==0:
    continue
  if B[i-1]-B[i]>0:
    dai[i]=B[i-1]-B[i]
    #B[i]+=B[i-1]-B[i]
    
print(sum(dai))

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

dai=[0 for _ in range(A)]

for i, l in enumerate(B):
  if i==0:
    continue
  if B[i-1]-B[i]>0:
    dai[i]=B[i-1]-B[i]
    B[i]+=B[i-1]-B[i]

print(sum(dai))
Buggy python submission (verdict: Time Limit Exceeded):
A = list(map(int, input().split())) 
B = list(map(int, input().split())) 
import itertools

l=[]
for v in itertools.combinations(B, A[1]):
  l.append(sum(v))
  
print(min(l))

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

B.sort()

print(sum(B[:A[1]]))
Buggy python submission (verdict: Time Limit Exceeded):
A = int(input())
B = list(map(int, input().split()))  
C = int(input())

sum_l=[]
for i in range(C):
  D = list(map(int, input().split()))
  
  for h in range(A):
    if B[h] == D[0]:
      B[h]=D[1]
    
  print(sum(B))

  

Fixed submission:
import collections

n=int(input())
arr=list(map(int,input().split()))
cnt=collections.defaultdict(int)
for val in arr: #あらかじめ各Aiの個数を数えておく
 cnt[val]+=1
sums=sum(arr) #あらかじめAiの総和を求めておく
q=int(input())
for _ in range(q):
 b,c=map(int,input().split())
 diff=(c-b)*(cnt[b]) #各クエリにおいて数列Aの総和は(値がBiである要素の個数)*(Ci-Bi)だけ変化する
 sums+=diff
 print(sums) 
 cnt[c]+=cnt[b] #値がCi,Biである要素の個数を更新する
 cnt[b]=0
Buggy python submission (verdict: Runtime Error):
num = int(input())

set_ = []
for i in range(num):
  a = int(input())
  set.append(a)
  
print(len(set(set_)))
  

Fixed submission:
num = int(input())

set_ = []
for i in range(num):
  a = input()
  set_.append(a)
  
print(len(set(set_)))
Buggy python submission (verdict: Runtime Error):
timeofholiday=int(input())
sum=0
homework_num=int(input())
for i in range(homework_num):
  a=int(input())
  sum+=a
  
if sum > timeofholiday:
  print("-1")
else:
  print(timeofholiday-sum)

Fixed submission:
input_= list(map(int, input().split()))
timeofholiday=input_[0]
sum=0
homework_num=input_[1]
que=list(map(int, input().split()))
for i in que:
  sum+=i
  
if sum > timeofholiday:
  print("-1")
else:
  print(timeofholiday-sum)
Buggy python submission (verdict: Runtime Error):
i = int(input)
fizz=[]
for x in i:
  if x % 3 ==0 and x%5==0:
    return 
  elif x % 3==0:
    return
  elif x%5==0:
    return 
  else:
    fizz.append(i)
print(sum(fizz))

Fixed submission:
i = int(input())
fizz=[]
for x in range(1, i+1):
  if x % 3 ==0 and x%5==0:
    continue
  elif x % 3==0:
    continue
  elif x%5==0:
    continue 
  else:
    fizz.append(x)
print(sum(fizz))
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce
 
def gcd(*numbers):
    return reduce(math.gcd, numbers)
gcd_list=[]
i=int(input())
for x in range(1, i+1):
  for y in range(1, i+1):
    for z in range(1, i+1):
      gcd_list.append(gcd(x, y, z))
      
print(sum(gcd_list))

Fixed submission:
from math import gcd
k=int(input())
ans=0
for i in range(1,k+1):
    for j in range(1,k+1):
        ans_=gcd(i,j)
        for l in range(1,k+1):
            ans+=gcd(ans_,l)
print(ans)
Buggy python submission (verdict: Runtime Error):
data=set([input() for i in range(3)])
if len(data)==1:
  print("NO")
else:
  print("YES")

Fixed submission:
a, b, c = input()
s=set([a, b, c])
if len(s)==1:
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
x, b, r = map(int, input().split())
count=0
flag_b=0
flag_r=0
while:
  count+=b if count!=x else break
  flag_b+=1
  count+=r if count!=x else break
  flag_r+=1
  
  
print(x-(flag_r*r))

Fixed submission:
x, b, r = map(int, input().split())
k=int(x/(b+r))
print(k*b+min(x%(b+r), b))
Buggy python submission (verdict: Runtime Error):
s=input()
t=input()
ans=[]
for i in range(len(s)-len(t)):
  count=0
  for j in range(len(t)):
    if t[j]==s[i+j]:
      count+=1
  ans.append(count)
print(len(t)-max(ans))

  


Fixed submission:
s=input()
t=input()
ans=[]
for i in range(len(s)-len(t)+1):
  count=0
  for j in range(len(t)):
    if t[j]==s[i+j]:
      count+=1
  ans.append(count)
print(len(t)-max(ans))
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
aa=list(map(int,input().split()))
value=1
for i in range(k):
  value*=aa[i]
for i in range(k,n):
  a=int(value*aa[i]/aa[i-k])
  if value<a:
    print("Yes")
  else:
    print("No")
  value=a

Fixed submission:
n,k=map(int,input().split())
aa=list(map(int,input().split()))
for i in range(k,n):
  if aa[i]/aa[i-k]>1:
    print("Yes")
  else:
    print("No")
Buggy python submission (verdict: Runtime Error):
import static org.hamcrest.CoreMatchers.is;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;

import org.junit.Assert;
import org.junit.Test;

public class MainTest {

	@Test
	public void 入力例_1() throws Exception {
		String input = 
			"1900";
		String output = 
			"100";

		assertIO(input, output);
	}

	@Test
	public void 入力例_2() throws Exception {
		String input = 
			"3000";
		String output = 
			"0";

		assertIO(input, output);
	}

	private void assertIO(String input, String output) throws Exception {
		ByteArrayInputStream in = new ByteArrayInputStream(input.getBytes());
		System.setIn(in);

		ByteArrayOutputStream out = new ByteArrayOutputStream();
		System.setOut(new PrintStream(out));

		Main.main(new String[0]);

		Assert.assertThat(out.toString(), is(output + System.lineSeparator()));
	}
}
n=int(input())
print(n)


Fixed submission:
n=int(input())
print(1000-n%1000 if n%1000!=0 else 0)
Buggy python submission (verdict: Runtime Error):
import sys
n,k=map(int,input().split())
a=list(map(int,input().split()))
if n<=k:
    print(*[n]*n)
else:
    for i in range(k):
        data=[0]*(n+1)
        for j in range(n):
          data[max(j-a[j-1]-1,0)]+=1
          data[min(j+a[j-1],n)]-=1
        r=[0]*n
        r[0]=data[0]  
        for i in range(1,n):
          r[i]=r[i-1]+data[i]
        if a==r:
            print(*[n]*n)
            sys.exit()
        a=r
    print(*a)

Fixed submission:
S=input()
print(S[0:3])
Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(1000000)
N=int(input())
A=list(map(int,input().split()))
def f(i):
  if i==0:
    return 1
  else:
    return f(i-1)*A[i-1]
a=f(N)
print(a if a<=10**(18) else -1)






Fixed submission:
N=int(input())
A=list(map(int,input().split()))
a=1
k=0
if 0 in A:
  print(0)
else:
  for i in range(N):
    a*=A[i]
    if a>10**(18):
      k=1
      break
  if k==1:
    print(-1)
  else:
    print(a)

Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(100000000000)
N=int(input())
A=list(map(int,input().split()))
def f(i):
  if i==0:
    return 1
  else:
    return f(i-1)*A[i-1]
a=f(N)
print(a if a<=10**(18) else -1)








Fixed submission:
N=int(input())
A=list(map(int,input().split()))
a=1
k=0
if 0 in A:
  print(0)
else:
  for i in range(N):
    a*=A[i]
    if a>10**(18):
      k=1
      break
  if k==1:
    print(-1)
  else:
    print(a)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
a=1
for i in range(N):
  a*=A[i]
print(a if a<=10**(18) else -1)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
a=1
k=0
if 0 in A:
  print(0)
else:
  for i in range(N):
    a*=A[i]
    if a>10**(18):
      k=1
      break
  if k==1:
    print(-1)
  else:
    print(a)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
a=1
for i in range(N):
  a*=A[i]
print(a if a<=10**(18) else -1)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
a=1
k=0
if 0 in A:
  print(0)
else:
  for i in range(N):
    a*=A[i]
    if a>10**(18):
      k=1
      break
  if k==1:
    print(-1)
  else:
    print(a)

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
def f(i):
  if i==0:
    return 1
  else:
    return f(i-1)*A[i-1]
a=f(N)
print(a if a<=10**(18) else -1)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
a=1
k=0
if 0 in A:
  print(0)
else:
  for i in range(N):
    a*=A[i]
    if a>10**(18):
      k=1
      break
  if k==1:
    print(-1)
  else:
    print(a)
Buggy python submission (verdict: Runtime Error):
a,b,N = map(int,input().split())
list =[]
for x in range(N-10000,N+10000):
    list.append(int(a*x/b)-a*int(x/b))
print(max(list))


Fixed submission:
K =int(input())
A,B=map(int,input().split())
list =[]
for i in range(A,B+1):
    list.append(i%K==0)
print("OK" if True in list else "NG")
Buggy python submission (verdict: Time Limit Exceeded):
a,b,N = map(int,input().split())
list =[]
for x in range(N+1):
    list.append(int(a*x/b)-a*int(x/b))
print(max(list))


Fixed submission:
a,b,N = map(int,input().split())
x =b-1
if x<N:
        print(int(a*x/b)-a*int(x/b))
else:
    x=N
    print(int(a*x/b)-a*int(x/b))
Buggy python submission (verdict: Runtime Error):
N=int(inout())
S=list(input() for i in range(N))
print(len(set(S)))


Fixed submission:
N = int(input())
List = list(input() for i in range(N))
print(len(set(List)))

Buggy python submission (verdict: Runtime Error):
N=int(inout())
S=[input() for i in range(N)]
print(len(set(S)))

Fixed submission:
N = int(input())
List = list(input() for i in range(N))
print(len(set(List)))

Buggy python submission (verdict: Runtime Error):
N = input()
List = list(input() for i in range(N))
print(len(set(List)))


Fixed submission:
N = int(input())
List = list(input() for i in range(N))
print(len(set(List)))
Buggy python submission (verdict: Runtime Error):
N,K =map(int,input().split())
count=0
for a in range(K,N+2):
  count+=0.5*(N-a+1)*(N-a+2)-0.5*a*(a-1)+1
print(count%(10**9+7))
  


Fixed submission:
import math
a=int(input())
print(2* math.pi *a)

Buggy python submission (verdict: Runtime Error):
N=int(input())
A =list(map(int,input().split()))
for i in range(N):
  print(A.count(i+1))
  


Fixed submission:
import math
a=int(input())
print(2* math.pi *a)

Buggy python submission (verdict: Runtime Error):
N,M= map(int,input().split())
List = [map(int,input().split())]
print(N-sum(List) if N-sum(List) >= 0 else -1)


Fixed submission:
import math
a=int(input())
print(2* math.pi *a)

Buggy python submission (verdict: Runtime Error):
import.math
a=int(input())
print(2* math.pi *a)


Fixed submission:
import math
a=int(input())
print(2* math.pi *a)

Buggy python submission (verdict: Runtime Error):
a=int(input())
print(2* \pi *a)


Fixed submission:
import math
a=int(input())
print(2* math.pi *a)

Buggy python submission (verdict: Runtime Error):
a=input()
print(2* \pi *a)

Fixed submission:
import math
a=int(input())
print(2* math.pi *a)
Buggy python submission (verdict: Runtime Error):
N M = map(int,input().split())
List = list(map(int,input().split()))
print(N-sum(List) if N-sum(List) >= 0 else -1)


Fixed submission:
N,M= map(int,input().split())
List = list(map(int,input().split()))
print(N-sum(List) if N-sum(List) >= 0 else -1)

Buggy python submission (verdict: Runtime Error):
N M = map(int,input().split())
List = list(map(int,input().split()))
print(N-sum(List) if N-sum(List) >= 0 else -1)


Fixed submission:
N,M= map(int,input().split())
List = list(map(int,input().split()))
print(N-sum(List) if N-sum(List) >= 0 else -1)

Buggy python submission (verdict: Runtime Error):
N M = map(int,input().split())
List = [map(int,input().split())]
print(N-sum(List) if N-sum(List) >= 0 else -1)

Fixed submission:
N,M= map(int,input().split())
List = list(map(int,input().split()))
print(N-sum(List) if N-sum(List) >= 0 else -1)
Buggy python submission (verdict: Runtime Error):
N =input()
A =list(map(int,input().split()))
l =[0*N]
for i in A:
  A[i]+=1
print(l, sep ="\n")

Fixed submission:
N =int(input())
A =list(map(int,input().split()))
l =[0]*N
for i in A:
  l[i-1]+=1
print(*l,sep="\n")

Buggy python submission (verdict: Runtime Error):
N =input()
A =list(map(input().split()))
l =[0*N]
for i in A:
  A[i]+=1
print(l, sep ="\n")


Fixed submission:
N =int(input())
A =list(map(int,input().split()))
l =[0]*N
for i in A:
  l[i-1]+=1
print(*l,sep="\n")

Buggy python submission (verdict: Runtime Error):
N =input()
A =list(map(input().split()))
l =[0*N]
for i in range A:
  A[i]+=1
print(l, sep ="\n")


Fixed submission:
N =int(input())
A =list(map(int,input().split()))
l =[0]*N
for i in A:
  l[i-1]+=1
print(*l,sep="\n")

Buggy python submission (verdict: Runtime Error):
N =input()
A =list(map(input().split()))
l =[0*N]
for i in range A:
  A[i]+=1
print(l, sep ="\n")


Fixed submission:
N =int(input())
A =list(map(int,input().split()))
l =[0]*N
for i in A:
  l[i-1]+=1
print(*l,sep="\n")

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A =list(map(int,input().split()))
for i in range(N):
  print(A.count(i+1))
  


Fixed submission:
N =int(input())
A =list(map(int,input().split()))
l =[0]*N
for i in A:
  l[i-1]+=1
print(*l,sep="\n")

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A =list(map(int,input().split()))
for i in range(N):
  print(A.count(i+1))
  


Fixed submission:
N =int(input())
A =list(map(int,input().split()))
l =[0]*N
for i in A:
  l[i-1]+=1
print(*l,sep="\n")

Buggy python submission (verdict: Runtime Error):
N=int(input())
A =list(map(int,input.split()))
for i in range(N):
  print(A.count(i+1))
  

Fixed submission:
N =int(input())
A =list(map(int,input().split()))
l =[0]*N
for i in A:
  l[i-1]+=1
print(*l,sep="\n")
Buggy python submission (verdict: Runtime Error):
N,K =map(int,input().split())
count=0
for a in range(K:N+2):
  count+=0.5*(N-a+1)*(N-a+2)-0.5*a*(a-1)+1
print(count%(10**9+7))
  


Fixed submission:
N,K =map(int,input().split())
count=0
for a in range(K,N+2):
  count+=0.5*N*(N+1)-0.5*(N-a)*(N-a+1)-0.5*a*(a-1)+1
print(int(count%(10**9+7)))
Buggy python submission (verdict: Runtime Error):
from math import gcd()
K = int(input())
count = 0
for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      count+=gcd(a,b,c)


Fixed submission:
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

K = int(input())
count = 0
for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      count+=gcd(a,b,c)
print(count)