Big Fibonacci Number

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Fibonacci numbers are defined by the following relation:
f(0) = f(1) = 1,
f(n) = f(n - 1) + f(n - 2) for n > 1
You need to calculate f(n) mod 1000000000

Options

exec is denied

rejudge feature is enabled

now post-mortem time, all source codes will be revealed

Sample input:_

0
1
2
3
4
5

Sample output:

1
1
2
3
5
8

Sample input:_

123456
123456789
1000000000
999999999
42
1337
3600
777777777

Sample output:

986327937
449506095
460937501
560546875
433494437
785629944
960277601
171970439

Sample input:_

111111111
222222222
333333333
444444444
555555555
666666666
777777777
888888888
999999999

Sample output:

440574219
176136957
572218287
204431945
552118467
260185253
171970439
72897489
560546875

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1mitchs870.04522016/05/22 11:33:090B / 40B / 41B
2mitchs860.04432017/06/30 23:24:420B / 43B / 39B

Ruby2 _

RankUserSizeTimeDateStatistics
1mitchs (tails)850.22872016/06/19 00:25:450B / 39B / 43B

Perl _

RankUserSizeTimeDateStatistics
1tails760.03632016/05/28 02:12:370B / 27B / 46B
2%201090.03672016/05/26 21:35:440B / 40B / 66B
3Hem1500.73832016/06/16 14:21:050B / 53B / 93B
4yuki3730.79452016/05/24 17:17:190B / 146B / 169B
5%20(tails)750.03542017/06/28 19:39:180B / 27B / 45B

Python _

RankUserSizeTimeDateStatistics
1mitchs1040.29312016/05/24 10:13:520B / 54B / 35B
2xnor1070.08912016/06/17 08:01:080B / ?B / ?B
3xsot1130.09532016/05/28 22:02:150B / 60B / 49B
4urupica1260.10702016/06/01 04:48:290B / ?B / ?B
5rolf1340.10042016/05/26 02:53:430B / 64B / 46B

JavaScript _

RankUserSizeTimeDateStatistics
1ETHproductions2030.08832016/06/14 01:06:540B / 146B / 56B

PARI/GP _

RankUserSizeTimeDateStatistics
1mitchs510.04242016/05/21 09:48:340B / 31B / 20B
2teebee510.03982016/05/21 20:05:020B / 31B / 20B
3Hendrik510.12562016/05/24 16:25:530B / 31B / 20B

Atlas _

RankUserSizeTimeDateStatistics
1tails (last closing paren not omittable?780.66802023/03/24 09:32:1512B / 19B / 47B
2darrenks(tails)790.69622023/03/24 07:32:1813B / 18B / 48B
3tails821.07412023/03/23 21:11:480B / 31B / 51B
4tails (readable)1050.66912023/03/23 21:14:070B / 42B / 55B

C _

RankUserSizeTimeDateStatistics
1tails1290.03662016/05/27 19:12:140B / 67B / 59B
2mitchs1360.03192016/05/26 10:45:590B / 69B / 67B
3kimiyuki2430.03232016/06/17 19:02:510B / 122B / 120B
4mitchs (tails)1280.03222016/06/19 07:23:040B / 67B / 58B

Haskell _

RankUserSizeTimeDateStatistics
1henkma1140.04472016/05/30 22:40:350B / 57B / 52B
2yuki1570.03772016/05/23 14:11:550B / 76B / 70B
3nagibator20051660.03812016/05/23 07:23:320B / ?B / ?B

Bash (builtins) _

RankUserSizeTimeDateStatistics
1tails1160.08832016/05/25 17:15:120B / 44B / 62B

Zsh _

RankUserSizeTimeDateStatistics
1Hendrik640.25402016/05/29 23:08:420B / 31B / 31B

dc _

RankUserSizeTimeDateStatistics
1tails780.04022016/06/16 19:04:030B / 54B / 23B
2%20(tails)770.04092017/06/28 16:58:090B / 54B / 23B

Whitespace _

RankUserSizeTimeDateStatistics
1kaz_u2280.04712016/06/08 01:16:390B / 0B / 0B
2%202360.05502016/05/28 01:28:290B / 0B / 0B

GolfScript _

RankUserSizeTimeDateStatistics
1tails550.21822016/05/26 14:01:030B / 9B / 46B

gs2 _

RankUserSizeTimeDateStatistics
1mitchs320.59102016/05/26 16:17:2113B / 14B / 3B
2tails270.31522017/06/30 18:17:0811B / 12B / 3B

Language Ranking_

RankLangUserSizeScore
1gs2tails2710000
2PARI/GPmitchs515294
3GolfScripttails554909
4ZshHendrik644218
5Perl%20(tails)753600
6dc%20(tails)773506
7Atlastails (last closing paren not omittable?783461
8Ruby2mitchs (tails)853176
9Rubymitchs863139
10Pythonmitchs1042596
11Haskellhenkma1142368
12Bash (builtins)tails1162327
13Cmitchs (tails)1282109
14JavaScriptETHproductions2031330
15Whitespacekaz_u2281184

return to the top page