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

def main():
        n = int(input())
        a_list = list(map(int, input().split()))
        result = [a_list.count(i) for i in range(1,n+1)]
        for i in result:
                print(i)
        
if __name__ == "__main__":
        main()       

Fixed submission:
import os

def main():
	n = int(input())
	a_list = list(map(int, input().split()))
	result = [0]*n
	for i in a_list:
		result[i-1] += 1
	for i in result:
		print(i)

if __name__ == "__main__":
	main()

Buggy python submission (verdict: Time Limit Exceeded):
import os
 
def main():
        n = int(input())
        a_list = list(map(int, input().split()))
        result = [0]*n
     
        for i in set(a_list):
                result[i-1] = a_list.count(i)
        for i in result:
                print(i)
 
if __name__ == "__main__":
        main()

Fixed submission:
import os

def main():
	n = int(input())
	a_list = list(map(int, input().split()))
	result = [0]*n
	for i in a_list:
		result[i-1] += 1
	for i in result:
		print(i)

if __name__ == "__main__":
	main()

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

def main():
        n = int(input())
        a_list = list(map(int, input().split()))
        result = [a_list.count(i) for i in range(1,n+1)]
        for i in result:
                print(i)

if __name__ == "__main__":
        main()

Fixed submission:
import os

def main():
	n = int(input())
	a_list = list(map(int, input().split()))
	result = [0]*n
	for i in a_list:
		result[i-1] += 1
	for i in result:
		print(i)

if __name__ == "__main__":
	main()

Buggy python submission (verdict: Time Limit Exceeded):
import os
 
def main():
        n = int(input())
        a_list = list(map(int, input().split()))
        result = [0]*n
        list_set = set(a_list)
        for i in list_set:
                result[i-1] = a_list.count(i)
        for i in result:
                print(i)
 
if __name__ == "__main__":
        main()

Fixed submission:
import os

def main():
	n = int(input())
	a_list = list(map(int, input().split()))
	result = [0]*n
	for i in a_list:
		result[i-1] += 1
	for i in result:
		print(i)

if __name__ == "__main__":
	main()

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

def main():
        n = int(input())
        a_list = tuple(map(int, input().split()))
        list_set = set(a_list)
        zero_list = [0]*n
        for l in list_set:
                zero_list[i-1] = a_list[i]
        for i in zero_list:
                print(i)

if __name__ == "__main__":
        main()

Fixed submission:
import os

def main():
	n = int(input())
	a_list = list(map(int, input().split()))
	result = [0]*n
	for i in a_list:
		result[i-1] += 1
	for i in result:
		print(i)

if __name__ == "__main__":
	main()

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

def main():
        n = int(input())
        a_list = tuple(map(int, input().split()))
        list_set = set(a_list)
        zero_list = [0]*n
        print(a_list)
        for l in list_set:
                zero_list[i-1] = a_list[i]
        for i in zero_list:
                print(i)
        """
        list_set = set(a_list)
        for i in list_set:
                result[i-1] = a_list.count(i)
        for i in result:
                print(i)
        """

if __name__ == "__main__":
        main()


Fixed submission:
import os

def main():
	n = int(input())
	a_list = list(map(int, input().split()))
	result = [0]*n
	for i in a_list:
		result[i-1] += 1
	for i in result:
		print(i)

if __name__ == "__main__":
	main()

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

def main():
        n = int(input())
        a_list = list(map(int, input().split()))
        result = [0]*n
        list_set = set(a_list)
        for i in list_set:
                result[i-1] = a_list.count(i)
        for i in result:
                print(i)

if __name__ == "__main__":
        main()

Fixed submission:
import os

def main():
	n = int(input())
	a_list = list(map(int, input().split()))
	result = [0]*n
	for i in a_list:
		result[i-1] += 1
	for i in result:
		print(i)

if __name__ == "__main__":
	main()