Code not bieng accepted

I am a newbie in the field of programming. I am trying to learn through practice problems. But most of my codes which are showing output in IDE are not accepted here.
Can u please help why this code is not being accepted?
link: https://www.codechef.com/LRNDSA05/problems/FIBEASY

def removeodd(D):
return [D[x] for x in range(1,len(D),2)]
T=int(input())
a,b=0,1
D=list()
for i in range(T):
if i<1:
D.append(i)
else:
a,b=b,(a+b)%10
D.append(a)
while len(D)>1:
D=removeodd(D)
print(D[0])

A few guidelines first:

  1. Always format your code before posting. Link
  2. Tips to get faster response to your problem. Link.

Now, try running your solution locally on given test case. ie.

1
9

You are not taking 9 as input and 0 is being printed for this test. How can it proceed further ?

1 Like