Submit  All submissions  Best solutions  Back to list 
FIBON  Fibonacci numbers 
Wersja polska  English version 
You are given number n and your task is to calculate nth Fibonacci number.
Input
The first line of the standard input contains one integer t (t<101) which is number of test cases.
In each of the next t lines there is one number n (n<71).
Output
For every test case print one number which is nth Fibonacci number.
Example
Input: 2
10
20
Output: 55
6765
Added by:  Piotr Kąkol 
Date:  20091220 
Time limit:  2.5s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: SCM qobi 
Resource:  Fibonacci numbers 
hide comments


20130906 18:48:38 challenger
@ওয়াসী (Wasi)  Happy to have encouraged you. :) Good job! Also, I like your attitude. :) @hendrik  You're right, I'm Piotr. I'm submitting it from a different account as I don't want glory for my name but to minimize the sum of the best solutions in all languages in all tasks. @Pranab Kumar  Imo it's quite easy to spot having to check only 70 numbers. On polish SPOJ I wouldn't answer, but here I will: for n=1 you print 0. @Jander  Amazing job with BF_PRIME. Couldn't believe that. ;) Last edit: 20130906 18:50:19 

20130906 10:41:06 ওয়াসী (Wasi)
@challenger reached 33B! Thanks for the motivation. @hendrik It doesn't really matter to me if he does it seeing solutions or any other way. I just love to shorten codes its full of fun :D Last edit: 20130906 14:10:41 

20130906 09:39:19 Jander
@hendrik  you would be right in that belief. Challenger does it to make people try that little bit harder :) 

20130906 08:37:09 hendrik
@Wasi: I wouldnt praise challenger too much as he can see the solutions of problems added by Piotr. I think they are one and the same. 

20130905 18:09:18 Pranab Kumar
admin pls check why wrong answer ? Problm ID: 9989561 Last edit: 20130905 18:18:01 

20130905 14:33:52 ওয়াসী (Wasi)
It was tough to reach 34B for me.But now the best AWK solution is 33B! Hats off! to @challenger really motivating... Last edit: 20130905 14:37:41 

20120719 22:46:49 Piotr KÄ…kol
I've rejudged all the submissions in the task. I'll do the same with the rest of my tasks as I receive a certain email. 

20120719 03:05:26 Hallvard Norheim Bø
Piotr: is the leading 55 bytes Python 3 solution real? I find it hard to believe that Python 3 can match Python 2.x in this challenge... 

20101202 11:34:34 HWK
Thank you! But it doesn't help. Otherwise I've already found a solution. 

20101127 16:15:31 Piotr KÄ…kol
The error: "Method 'Bool' not found for invocant of class 'Integer'". 