am i a fibonacci number

http://www.codechef.com/viewsolution/4623016

Please have a look at my solution for “am i a fibonacci number”,It runs fine in my compiler but shows me ‘wrong answer’ in code chef.
Can anyone help me out in this.