Degree of Booleans

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

Given N,find how many boolean functions of degree N are there?

Output the sum of digits of your answer.

Options

exec is denied

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

Sample input:_

909
800
875
893
964
987
898
924
810
892
885
837
795
925
758
799
955
833
974
754
762
784
832
983
834
770
833
811
871
996
794
853
927
870
845
791
928
956
883
883
991
990
961
954
779
877
793
861
917
923

Sample output:

2413
2176
2473
2383
2560
2647
2452
2413
2359
2326
2449
2341
2098
2533
2005
2092
2731
2311
2617
1975
2017
2047
2290
2770
2287
2059
2311
2326
2254
2782
2113
2281
2458
2377
2266
2140
2380
2518
2398
2398
2722
2755
2596
2656
2023
2173
2191
2323
2563
2473

Sample input:_

830
972
862
843
884
997
816
779
985
990
838
820
957
781
881
917
908
896
935
792
969
941
762
885
963
836
828
874
880
907
862
866
961
800
957
754
967
935
803
838
789
951
833
781
951
908
946
950
851
798
752
764
872
834
933
874
790
951
954
803
941
914
766
888
908
788
906
787
852
855
873
750
796
799
991
964
778
836
755
950
751
871
762
885
914
977
934
750
921
998
773
815
933
974
891
886
887
898
903
823

Sample output:

2257
2782
2380
2233
2410
2578
2233
2023
2659
2755
2245
2173
2602
2038
2365
2563
2482
2662
2581
2188
2602
2401
2017
2449
2566
2266
2278
2299
2407
2461
2380
2347
2596
2176
2602
1975
2641
2581
2131
2245
2071
2620
2311
2038
2620
2482
2488
2581
2230
2188
2014
2104
2338
2287
2611
2299
2119
2620
2656
2131
2401
2545
2128
2395
2482
2158
2494
2155
2215
2296
2386
2035
2119
2092
2722
2560
2164
2266
2122
2581
1939
2254
2017
2449
2545
2716
2551
2035
2341
2563
2194
2167
2611
2617
2404
2425
2419
2452
2512
2263

Sample input:_

2413
2176
2473
2383
2560
2647
2452
2413
2359
2326
2449
2341
2098
2533
2005
2092
2731
2311
2617
1975
2017
2047
2290
2770
2287
2059
2311
2326
2254
2782
2113
2281
2458
2377
2266
2140
2380
2518
2398
2398
2722
2755
2596
2656
2023
2173
2191
2323
2563
2473

Sample output:

6637
5764
6619
6538
6997
6907
6565
6637
6421
6142
6592
6403
5710
6808
5323
5611
7420
6259
7285
5485
5368
5755
6367
7555
6277
5512
6259
6142
6106
7447
5818
6259
6808
6349
5926
5800
6295
6826
6655
6655
7267
7519
7204
7213
5485
5881
5971
6295
6727
6619

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1kaki440.77952011/05/01 21:27:330B / 22B / 21B
2leonid440.93122011/05/03 18:51:440B / 23B / 19B

Perl _

RankUserSizeTimeDateStatistics
1tails761.73412011/05/02 13:56:440B / 28B / 45B
2teebee481.37342011/12/25 22:51:330B / 23B / 22B

Python _

RankUserSizeTimeDateStatistics
1hallvabo430.36702011/05/01 20:26:590B / 29B / 12B
2leonid430.36972011/05/03 19:09:500B / 29B / 12B
3Debanjan450.34092011/05/02 07:35:030B / ?B / ?B

Scheme _

RankUserSizeTimeDateStatistics
1kaki770.90922011/05/01 21:12:290B / 49B / 24B
2dico_leque770.89922011/05/02 03:23:420B / 49B / 24B
3youz770.94332011/05/02 12:02:040B / 49B / 24B
4cddddr850.79672011/05/01 20:47:150B / 56B / 26B

Common LISP _

RankUserSizeTimeDateStatistics
1youz800.32962011/05/02 12:02:160B / 46B / 31B
2kozima861.31312011/05/01 20:37:220B / 50B / 29B

Arc _

RankUserSizeTimeDateStatistics
1youz((not (2^2)^N but 2^(2^N)?? http://mathworld.wolfram.com/BooleanFunction.html))466.99252011/05/02 17:00:250B / 25B / 18B

Icon _

RankUserSizeTimeDateStatistics
1teebee620.90852012/04/09 07:51:140B / 36B / 22B
2pooq691.02302012/04/04 23:34:560B / 43B / 21B

REXX _

RankUserSizeTimeDateStatistics
1pooq951.00952012/04/15 13:34:010B / 65B / 13B

PARI/GP _

RankUserSizeTimeDateStatistics
1teebee500.65772012/05/17 18:42:450B / 30B / 19B

J _

RankUserSizeTimeDateStatistics
1pooq380.89402011/05/01 19:32:070B / 14B / 20B
2I., S.350.55942011/05/05 13:33:450B / 15B / 20B
3I., S.(pooq)350.88712011/05/05 13:34:190B / 13B / 20B

OCaml _

RankUserSizeTimeDateStatistics
1m.ukai((not (2^2)^N but 2^(2^N)??))1770.44962011/05/01 23:05:390B / 120B / 45B

Haskell _

RankUserSizeTimeDateStatistics
1Kroisse710.31902011/05/18 09:38:592B / 44B / 17B

Pascal _

RankUserSizeTimeDateStatistics
1*yuko*2010.34662011/05/02 19:54:130B / 133B / 53B

Fortran _

RankUserSizeTimeDateStatistics
1*yuko*1290.39952011/05/02 20:09:380B / 76B / 51B
2*yuko*1152.05522012/12/02 11:30:240B / 71B / 39B

GolfScript _

RankUserSizeTimeDateStatistics
1nooodl191.48152011/11/20 02:33:180B / ?B / ?B

FlogScript _

RankUserSizeTimeDateStatistics
1zzo38120.87192011/06/07 12:56:450B / 4B / 8B

goruby _

RankUserSizeTimeDateStatistics
1leonid250.93522011/05/03 19:12:290B / 9B / 15B
2kaki250.94202011/05/03 19:46:100B / 9B / 14B

Groovy _

RankUserSizeTimeDateStatistics
1nn737.85812011/05/01 18:08:280B / 51B / 18B
2teebee(nn)623.66372014/11/16 09:47:300B / 40B / 20B

Language Ranking_

RankLangUserSizeScore
1FlogScriptzzo381210000
2GolfScriptnooodl196315
3gorubyleonid254800
4JI., S.(pooq)353428
5Pythonhallvabo432790
6Rubykaki442727
7Arcyouz((not (2^2)^N but 2^(2^N)?? http://mathworld.wolfram.com/BooleanFunction.html))462608
8Perlteebee482500
9PARI/GPteebee502400
10Iconteebee621935
11Groovyteebee(nn)621935
12HaskellKroisse711690
13Schemekaki771558
14Common LISPyouz801500
15REXXpooq951263
16Fortran*yuko*1151043
17OCamlm.ukai((not (2^2)^N but 2^(2^N)??))177677
18Pascal*yuko*201597

return top