I've got this code:
while True:
a=0
b=1
l=[]
N=int(input())
chk=0
for k in range(N):
l.append(0)
for i in range(N):
a,b=b,a+b
l[i]+=b
for j in range(len(l)):
if l[j]==N:
chk=1
break
if chk==1:
print("Isfibo")
else:
print("Isnotfibo")
When I run it on IDLE it gives me the required output but if I try to use this same code on hacker rank it gives a runtime error and
it says
Nice try, but you did not pass this test case.
Input (stdin)
3
5
7
8
Your Output (stdout)
Isfibo
Isfibo
Isnotfibo
Isfibo
Expected Output
IsFibo
IsNotFibo
IsFibo
Compiler Message
Runtime Error
Error (stderr)
Traceback (most recent call last):
File "solution.py", line 6, in <module>
N=int(input())
EOFError: EOF when reading a line