i wrote this code for the chfm problem, i am able to run it in my system but while submitting it’s showing error.

import random

from statistics import mean

c=int(input("Enter a coin number to be tested for stealing: "))

l=[]

for i in range(int(input())):

l.append(i)

print(l)

arth_mean=mean(l)

print(arth_mean)

for i in l:

if c == i:

print(“Coin number exist!”)

l.remove(i)

print(l)

new_mean=mean(l)

print(new_mean)

if arth_mean == new_mean:

print("The input coin number can be stolen: " , c)

else:

print(“Impossible”)