Ladder corner problem

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


How long a ladder can you carry around a corner?
________________
| / |
| /ladder a
| / ________|
| / |
| / |
| / |
|/ |
|___b___|

input data: a b
output data: longest_ladder

The answer is rounded off and made an integer.

Options

exec is denied

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

Sample input:_

6501 6426
9021 4028
5003 9222
6660 5993
1001 9595
2090 8290
6892 3186
1706 1236
1015 6409
4768 3809
495 1011
4788 5218
1328 8230
2115 2837
2985 2974
8282 3960
3799 4763
839 8000
1498 5774
7178 2903
4820 745
4839 4118
9372 4466
7193 8414
9735 3268
6577 224
8606 1010
643 6569
2347 9352
4942 7484
2636 9869
9916 4743
9543 2769
6522 4982
8217 8149
3762 1243
753 2231
9892 8210
7187 81
3038 5098
6422 3629
1617 230
4058 1404
7686 135
8014 2020
3998 8397
2979 3222
3545 138
2641 698
7728 8733
4725 1181
8286 2107
3804 8557
2176 6195
7611 6200
8934 4730
251 3763
9227 6819
2456 1936
3509 9370
4577 7703
4450 4840
4726 5953
6657 5964
6674 8168
9831 2560
4229 6801
2457 6367
4615 1641
8900 3228
7260 1813
6249 2867
2931 5785
2223 4298
2062 7112
1918 8626
8254 8776
5916 2325
8980 2915
2077 8835
683 4095
4302 365
2409 6654
4670 7115
2591 3758
5465 5009
8159 6287
3596 6429
7518 2937
5832 9602
6231 1223
6582 8687
757 2381
2596 3016
4548 5076
2405 5004
505 5694
7184 2665
1125 1771
6437 9286

Sample output:

18281
17987
19816
17886
12955
13719
13920
4143
9420
12104
2087
14146
12148
6978
8427
16942
12083
10812
9634
13810
7046
12653
19147
22049
17582
7640
11879
8769
15456
17449
16607
20287
16461
16220
23145
6759
4036
25563
7736
11381
14028
2321
7402
8478
13261
17150
8767
4173
4430
23265
7800
13746
17034
11356
19498
19012
4729
22607
6197
17551
17176
13134
15069
17840
20954
16421
15456
12050
8494
16491
11982
12586
12100
9063
12265
13787
24080
11268
16043
14337
6091
5606
12322
16546
8928
14808
20372
13985
14289
21607
9641
21525
4226
7929
13604
10257
7474
13413
4061
22113

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1leonid490.01782012/03/16 01:49:590B / 21B / 25B
2clock490.02512012/03/18 20:41:230B / 21B / 25B
3uru510.01932012/03/20 00:26:290B / 24B / 24B
4@tttttanaka550.01682012/03/23 23:44:210B / 25B / 27B
5eban560.11882012/03/16 18:43:480B / 26B / 27B
6shinh830.04362012/03/25 19:43:410B / 42B / 36B
7@tttttanaka530.03452012/04/01 06:44:460B / 23B / 27B

Perl _

RankUserSizeTimeDateStatistics
1teebee470.01732012/03/16 03:43:040B / 16B / 30B
2tails470.01642012/03/16 20:29:260B / 15B / 31B
3test1470.01552012/03/17 02:04:060B / ?B / ?B
4nfouille490.01792012/03/27 20:14:000B / ?B / ?B
5macik520.02862012/03/29 07:01:140B / ?B / ?B
6teebee(nn)460.01592012/04/02 02:28:040B / 14B / 31B

Python _

RankUserSizeTimeDateStatistics
1leonid730.03902012/03/16 01:47:510B / 38B / 34B
2clock730.02842012/03/21 01:24:310B / 38B / 34B
3hallvabo740.03322012/03/16 07:30:430B / 35B / 39B
4macik770.60792012/03/27 17:55:340B / ?B / ?B

PHP _

RankUserSizeTimeDateStatistics
1teebee790.16402012/03/16 04:35:295B / 39B / 35B
2clock790.08032012/03/18 20:55:135B / 39B / 35B
3teebee(nn)750.07642012/04/02 02:52:505B / 36B / 34B

Scheme _

RankUserSizeTimeDateStatistics
1kaki600.07572012/03/30 13:15:420B / 36B / 23B

Common LISP _

RankUserSizeTimeDateStatistics
1kaki620.48902012/03/30 13:19:020B / 38B / 23B

Arc _

RankUserSizeTimeDateStatistics
1pooq591.81762012/03/16 23:27:280B / 39B / 20B

Clojure _

RankUserSizeTimeDateStatistics
1pooq792.00122012/03/16 23:44:260B / 49B / 29B

Io _

RankUserSizeTimeDateStatistics
1pooq910.19652012/03/16 12:18:330B / 67B / 19B

JavaScript _

RankUserSizeTimeDateStatistics
1teebee800.02252012/03/16 09:11:130B / 44B / 35B
2clock800.06372012/03/16 21:56:340B / 44B / 35B
3nn800.01952012/03/16 23:44:410B / 44B / 35B
4hakusui800.03912012/03/29 07:25:550B / 44B / 35B
5nn770.01992012/04/02 01:46:110B / 43B / 33B

Lua _

RankUserSizeTimeDateStatistics
1pooq660.08512012/03/16 05:08:410B / 37B / 28B
2teebee660.01702012/03/18 06:26:130B / 37B / 25B
3Hendrik750.01502012/03/18 05:33:200B / 40B / 32B

Tcl _

RankUserSizeTimeDateStatistics
1pooq810.28162012/03/16 12:45:480B / 48B / 26B

Xtal _

RankUserSizeTimeDateStatistics
1teebee1000.18202012/03/16 09:20:150B / 50B / 48B

Prolog _

RankUserSizeTimeDateStatistics
1teebee540.13182012/03/16 05:05:410B / 27B / 26B
2pooq540.04522012/03/16 06:05:530B / 27B / 26B

BASIC _

RankUserSizeTimeDateStatistics
1teebee490.03192012/03/17 01:44:220B / 28B / 20B
2pooq490.01452012/03/17 08:26:510B / 28B / 18B

Erlang _

RankUserSizeTimeDateStatistics
1pooq1490.10802012/08/25 11:45:520B / 77B / 67B

J _

RankUserSizeTimeDateStatistics
1pooq400.04342012/03/16 05:44:560B / 13B / 27B
2I., S.440.03452012/03/16 20:46:460B / 15B / 25B
3I., S.(pooq,dual)330.04812012/04/02 07:20:180B / 10B / 23B
4I., S.(pooq)340.05212012/03/29 23:14:580B / 10B / 24B

K _

RankUserSizeTimeDateStatistics
1teebee300.01472012/03/18 13:55:180B / 7B / 23B

C _

RankUserSizeTimeDateStatistics
1ush830.01452012/03/16 12:01:370B / 43B / 40B
2teebee830.01792012/03/17 03:32:070B / 43B / 40B
3inaniwa830.01532012/03/17 23:21:320B / 43B / 40B
4nn830.01242012/03/17 23:55:460B / 43B / 40B
5leonid830.01302012/03/20 06:46:290B / 43B / 40B
6fill830.03332012/03/24 19:23:530B / 43B / 40B

Haskell _

RankUserSizeTimeDateStatistics
1rst76690.01932012/03/24 13:57:120B / 42B / 27B
2henkma690.02582012/03/24 20:27:480B / 42B / 27B
3notogawa690.02482012/03/24 21:48:210B / 42B / 27B

Pascal _

RankUserSizeTimeDateStatistics
1*yuko*840.01742012/03/17 01:14:550B / 54B / 26B
2uru840.01642012/03/17 14:31:370B / 54B / 26B

Fortran _

RankUserSizeTimeDateStatistics
1*yuko*610.01432012/03/17 01:10:220B / 33B / 27B
2teebee610.01752012/03/17 03:45:020B / 33B / 27B

C# _

RankUserSizeTimeDateStatistics
1macik1930.09142012/03/27 03:57:150B / ?B / ?B

COBOL _

RankUserSizeTimeDateStatistics
1*yuko*2310.02812012/03/28 21:37:280B / 150B / 50B

Maxima _

RankUserSizeTimeDateStatistics
1teebee612.48682012/03/16 17:24:460B / 36B / 25B
2pooq622.43542012/03/16 12:20:260B / 37B / 22B

Octave _

RankUserSizeTimeDateStatistics
1inaniwa510.29632012/03/21 14:01:230B / 23B / 28B
2teebee520.39662012/03/16 07:05:410B / 25B / 27B

REBOL _

RankUserSizeTimeDateStatistics
1pooq860.03122012/03/19 02:16:220B / 55B / 19B
2clock(pooq)750.02592012/07/19 04:30:430B / 40B / 23B

Asymptote _

RankUserSizeTimeDateStatistics
1teebee650.13012012/03/16 03:56:100B / 38B / 26B
2teebee(nn)630.20162012/04/02 02:41:070B / 36B / 26B

Euphoria _

RankUserSizeTimeDateStatistics
1nn1480.01812012/03/24 01:23:240B / 100B / 41B
2clock1480.01602012/03/28 22:52:360B / 100B / 41B
3nn1440.01852012/04/02 01:47:250B / 96B / 41B

AWK _

RankUserSizeTimeDateStatistics
1eban320.01412012/03/16 18:36:080B / 13B / 19B
2pooq320.01332012/03/16 21:10:050B / 13B / 19B
3teebee320.01592012/03/16 22:04:540B / 13B / 19B

bc _

RankUserSizeTimeDateStatistics
1teebee721.66232012/03/17 04:34:460B / 37B / 34B
2nn790.04992012/03/18 00:17:450B / 41B / 37B
3test792.87772012/03/25 19:20:430B / 40B / 38B
4clock792.95852012/03/25 19:22:110B / 40B / 38B

dc _

RankUserSizeTimeDateStatistics
1tails430.18142012/03/26 04:15:490B / 30B / 13B
2shinh481.18812012/03/26 03:21:400B / 34B / 14B
3tails (shinh)420.12732012/03/30 02:57:430B / 30B / 12B

R _

RankUserSizeTimeDateStatistics
1teebee570.59212012/03/16 07:03:020B / 36B / 21B
2pooq610.16262012/03/16 05:52:280B / 38B / 23B

GolfScript _

RankUserSizeTimeDateStatistics
1tails330.12902012/03/16 23:34:300B / 11B / 22B

Vim _

RankUserSizeTimeDateStatistics
1clock570.12792012/03/17 01:16:113B / 27B / 25B
2nn620.12902012/03/18 01:37:382B / 32B / 27B

goruby _

RankUserSizeTimeDateStatistics
1leonid400.20112012/03/23 17:44:520B / 14B / 25B
2clock400.19622012/03/23 21:36:110B / 13B / 27B
3@tttttanaka670.29392012/03/23 15:46:550B / 37B / 29B

Groovy _

RankUserSizeTimeDateStatistics
1hakusui741.57382012/03/16 08:26:220B / 46B / 26B
2teebee741.20112012/03/16 08:53:150B / 47B / 27B
3nn741.84012012/03/18 02:25:210B / 47B / 27B
4clock834.09472012/03/18 21:04:520B / 47B / 35B

Scala _

RankUserSizeTimeDateStatistics
1pooq905.61892012/03/17 14:37:520B / 63B / 25B

Logo _

RankUserSizeTimeDateStatistics
1teebee630.11562012/03/16 06:43:450B / 46B / 8B

Language Ranking_

RankLangUserSizeScore
1Kteebee3010000
2AWKeban329375
3GolfScripttails339090
4JI., S.(pooq,dual)339090
5gorubyleonid407500
6dctails (shinh)427142
7Perlteebee(nn)466521
8Rubyleonid496122
9BASICteebee496122
10Octaveinaniwa515882
11Prologteebee545555
12Rteebee575263
13Vimclock575263
14Arcpooq595084
15Schemekaki605000
16Maximateebee614918
17Fortran*yuko*614918
18Common LISPkaki624838
19Logoteebee634761
20Asymptoteteebee(nn)634761
21Luapooq664545
22Haskellrst76694347
23bcteebee724166
24Pythonleonid734109
25Groovyhakusui744054
26PHPteebee(nn)754000
27REBOLclock(pooq)754000
28JavaScriptnn773896
29Clojurepooq793797
30Tclpooq813703
31Cush833614
32Pascal*yuko*843571
33Scalapooq903333
34Iopooq913296
35Xtalteebee1003000
36Euphoriann1442083
37Erlangpooq1492013
38C#macik1931554
39COBOL*yuko*2311298

return top