All submissions for this problem are available.
Just find the Nth Non-Fibonacci number from natural Numbers
First line contains T which is the number of test cases.
T lines follow each with an integer N.
For each N output the Nth Non-Fibonacci number.
Should contain all the constraints on the input data that you may have. Format it like:
- 1 ≤ T ≤ 105
- 1 ≤ N ≤ 1015
Input: 3 1 2 3 Output: 4 6 7
The first few Natural Numbers that are Fibonacci are : 1,2,3,5,8,13.. Thus the first few Natural Numbers that are not Fibonacci are 4,6,7,9,...
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, PYP3, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.