4 in 3

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

A square is in it with a right triangle. When making two sides of length which crosses at right angles A,B, find a side of square length C.


* +
/| |
/ | |
/ | |
/ | |
/ | B
*-----* + |
/| | | |
/ | | C |
/ | | | |
*---*-----* + +
+--C--+
+----A----+

Options

exec is denied

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

Sample input:_

4 5

Sample output:

2.22

Sample input:_

20 20
314 27
888 980

Sample output:

10.00
24.86
465.87

Sample input:_

125 237
462 70
846 211
870 632
863 210
517 668
322 178
385 879
524 728
490 372
671 48
245 725
859 7
730 402
692 572
276 11
221 416
6 877
922 125
186 304
694 705
884 910
188 473
987 409
498 452
861 93
77 18
739 95
761 607
723 965
320 353
639 62
925 916
992 846
917 340
163 547
397 166
21 690
892 445
673 707
229 595
553 578
139 219
395 92
853 982
706 354
799 131
777 511
691 227
58 615
423 19
63 676
193 367
485 741
147 637
806 515
478 594
230 762
289 902
575 892
941 670
340 814
163 97
543 370
996 183
10 551
152 999
829 925
86 517
253 523
338 69
270 80
484 12
137 557
796 480
11 915
930 512
613 269
652 762
44 946
871 962
939 452
961 844
348 750
748 613
908 914
409 718
513 654
943 935
967 596
889 212
350 179
285 629
648 852
848 459
56 390
906 949
799 680
737 649
284 117

Sample output:

81.84
60.79
168.88
366.07
168.90
291.44
114.63
267.73
304.69
211.46
44.80
183.12
6.94
259.24
313.15
10.58
144.33
5.96
110.08
115.40
349.73
448.41
134.53
289.17
236.94
83.93
14.59
84.18
337.67
413.33
167.85
56.52
460.24
456.60
248.04
125.58
117.06
20.38
296.89
344.79
165.36
282.61
85.03
74.62
456.48
235.78
112.55
308.27
170.87
53.00
18.18
57.63
126.48
293.14
119.44
314.22
264.86
176.67
218.87
349.63
391.35
239.83
60.81
220.05
154.60
9.82
131.93
437.19
73.73
170.51
57.30
61.71
11.71
109.96
299.44
10.87
330.21
186.96
351.36
42.04
457.12
305.12
449.35
237.70
336.90
455.50
260.57
287.49
469.49
368.73
171.18
118.43
196.13
368.06
297.81
48.97
463.50
367.36
345.10
82.86

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1leonid420.11342008/12/09 08:53:420B / 21B / 19B
2yowa420.14132008/12/10 01:02:460B / 21B / 19B
3flagitious420.14212008/12/10 02:21:110B / 18B / 22B
4shinh430.20092008/12/11 01:46:580B / 18B / 23B
5ksk440.18692008/12/12 02:08:090B / 22B / 20B
6ema470.11912008/12/09 05:16:410B / 22B / 23B
7murky-satyr470.15102008/12/09 07:23:580B / 20B / 23B
8mokos480.05122008/12/11 20:08:220B / ?B / ?B
9primo490.01872008/12/10 01:07:320B / 22B / 23B
10eban500.06082008/12/08 18:29:190B / 25B / 21B
11uru500.05242008/12/15 00:24:490B / ?B / ?B
12niha510.04842008/12/11 01:59:231B / 21B / 27B
13kaki530.19162008/12/10 01:09:290B / 19B / 32B
14Zauberer540.03932008/12/09 17:51:390B / 23B / 27B
15tabasa630.08042008/12/08 21:04:551B / ?B / ?B
16_640.04982008/12/08 21:03:212B / ?B / ?B
17aibou750.03652008/12/10 13:15:590B / ?B / ?B

Perl _

RankUserSizeTimeDateStatistics
1Mithran360.23952008/12/08 19:05:060B / 11B / 23B
2leonid360.05032008/12/08 19:26:120B / 14B / 20B
3primo360.08662008/12/09 06:42:180B / 11B / 23B
4shinh440.25082008/12/11 01:57:550B / 21B / 20B
5teebee330.03412011/05/13 06:07:470B / 11B / 19B
6%20330.06712016/12/06 09:26:330B / 11B / 20B

Python _

RankUserSizeTimeDateStatistics
1hallvabo660.22732008/12/08 21:56:360B / 40B / 25B
2kt3k660.16702008/12/09 02:17:380B / 40B / 25B
3primo660.03832008/12/09 06:25:230B / 40B / 25B
4Defenestrator660.18682008/12/09 09:47:480B / 40B / 25B

PHP _

RankUserSizeTimeDateStatistics
1primo640.20382008/12/09 10:35:470B / 30B / 33B
2murky-satyr680.26642008/12/11 23:53:510B / 32B / 35B
3teebee610.18452011/05/13 06:33:429B / 26B / 26B
4murky-satyr630.24262008/12/20 17:17:220B / 30B / 32B

Scheme _

RankUserSizeTimeDateStatistics
1murky-satyr750.36912008/12/09 02:22:240B / 32B / 40B

Common LISP _

RankUserSizeTimeDateStatistics
1kozima450.53802008/12/08 18:51:040B / 19B / 23B

Arc _

RankUserSizeTimeDateStatistics
1youz3810.68922009/10/20 00:05:400B / 19B / 17B
2pooq4013.26962009/10/02 14:09:370B / 21B / 18B

Io _

RankUserSizeTimeDateStatistics
1murky-satyr921.14882008/12/09 02:50:550B / 73B / 15B

JavaScript _

RankUserSizeTimeDateStatistics
1murky-satyr620.11242008/12/09 01:44:570B / 36B / 25B
2nn620.14062008/12/14 21:59:560B / 36B / 25B
3ktt650.12052008/12/08 19:35:240B / 36B / 28B
4Tomac610.00772011/10/02 00:31:090B / ?B / ?B

Lua _

RankUserSizeTimeDateStatistics
1murky-satyr650.16392008/12/09 02:31:290B / 37B / 26B

Tcl _

RankUserSizeTimeDateStatistics
1murky-satyr820.41682008/12/12 16:37:050B / 45B / 24B
2murky-satyr680.02312009/11/22 03:26:220B / 38B / 21B
3tensaix2j710.09832008/12/30 12:01:580B / ?B / ?B

Xtal _

RankUserSizeTimeDateStatistics
1teebee(pooq)880.07082012/01/02 11:06:510B / 44B / 41B
2pooq890.07612011/01/26 22:58:470B / 44B / 43B

REXX _

RankUserSizeTimeDateStatistics
1pooq440.03662012/04/14 06:51:570B / 27B / 10B

Prolog _

RankUserSizeTimeDateStatistics
1pooq620.47432008/12/08 23:06:180B / 31B / 30B
2pooq440.29712012/03/05 00:34:400B / 22B / 21B

Forth _

RankUserSizeTimeDateStatistics
151b1170.43892008/12/14 01:30:070B / 73B / 18B
2zzo381091.22322011/05/13 03:54:390B / 67B / 18B

BASIC _

RankUserSizeTimeDateStatistics
1pooq490.44132008/12/08 23:18:340B / 31B / 14B
2*yuko*420.00222010/05/05 16:08:540B / 25B / 17B

Erlang _

RankUserSizeTimeDateStatistics
151b1131.76372008/12/11 02:08:110B / 52B / 57B

J _

RankUserSizeTimeDateStatistics
1pooq310.71092008/12/09 04:50:130B / 10B / 20B
2I., S.280.12902010/11/07 19:53:280B / 11B / 17B
3pooq300.83622009/03/14 23:52:300B / 11B / 18B
4medialuna940.06662014/08/16 00:27:590B / ?B / ?B

C _

RankUserSizeTimeDateStatistics
1Purika680.09912008/12/09 11:55:360B / 32B / 36B
2sky_way680.05382008/12/09 11:58:360B / 32B / 36B
3hallvabo680.05742008/12/09 21:59:110B / 34B / 34B
4mazun680.04772008/12/10 21:50:350B / ?B / ?B
551b680.08462008/12/11 01:08:460B / 32B / 36B
6REM720.08162008/12/13 13:16:540B / ?B / ?B
7Raider680.02042009/04/17 07:38:480B / 34B / 34B
8Stimim680.03962009/08/31 18:39:500B / ?B / ?B
9inaniwa680.00122009/12/01 08:21:170B / 32B / 36B
10blahmoo680.03542013/02/23 04:45:460B / ?B / ?B
11aaa690.08932008/12/30 12:20:450B / ?B / ?B

D _

RankUserSizeTimeDateStatistics
151b920.02592008/12/11 02:01:110B / 53B / 35B
251b910.09912008/12/16 22:48:180B / 53B / 34B

OCaml _

RankUserSizeTimeDateStatistics
1ksk830.12332009/08/14 21:00:120B / 50B / 24B

Haskell _

RankUserSizeTimeDateStatistics
1notogawa940.07482008/12/08 20:21:430B / ?B / ?B

Java _

RankUserSizeTimeDateStatistics
1teebee1410.55902011/05/13 06:22:020B / 92B / 43B
2uru3770.67802009/02/15 11:32:030B / 269B / 80B

Pascal _

RankUserSizeTimeDateStatistics
1uru730.06012008/12/08 17:08:050B / ?B / ?B

Fortran _

RankUserSizeTimeDateStatistics
1pooq460.04832008/12/09 06:09:590B / 28B / 14B
2*yuko*430.04292011/11/22 01:13:000B / 25B / 17B

Maxima _

RankUserSizeTimeDateStatistics
1teebee640.55562011/05/13 06:39:280B / 29B / 33B
2pooq710.55242011/03/11 01:13:480B / 31B / 38B

Octave _

RankUserSizeTimeDateStatistics
1teebee630.56002013/08/14 06:11:040B / 25B / 38B
2inaniwa681.23082011/03/27 11:28:480B / 28B / 40B

REBOL _

RankUserSizeTimeDateStatistics
1pooq1240.14372009/02/19 22:32:300B / 72B / 30B

Asymptote _

RankUserSizeTimeDateStatistics
1teebee600.43322011/12/20 06:09:540B / 35B / 24B

AWK _

RankUserSizeTimeDateStatistics
1nn280.06742008/12/09 10:58:330B / 14B / 14B
2tabasa280.03482008/12/10 16:25:200B / ?B / ?B
3yamaya290.08292008/12/08 17:12:310B / 13B / 16B
4eban290.04352008/12/10 16:40:470B / 13B / 16B
5llhuii280.03182014/08/16 01:14:220B / ?B / ?B

xgawk _

RankUserSizeTimeDateStatistics
1llhuii310.03252014/08/16 01:14:080B / ?B / ?B

Postscript _

RankUserSizeTimeDateStatistics
1yshl(bin)681.25522008/12/11 01:52:0126B / 26B / 15B
2ySas731.80622008/12/11 00:47:3436B / 26B / 11B
3yshl1111.33582008/12/11 01:51:510B / 80B / 11B

R _

RankUserSizeTimeDateStatistics
151b683.57342008/12/15 01:07:010B / 37B / 31B

GolfScript _

RankUserSizeTimeDateStatistics
1flagitious300.31342008/12/09 03:39:380B / 8B / 22B
2irori320.45702008/12/09 00:03:270B / 8B / 24B

gs2 _

RankUserSizeTimeDateStatistics
1whio210.25352016/12/06 06:08:324B / 9B / 7B

Vim _

RankUserSizeTimeDateStatistics
1nn450.14902009/12/12 20:48:533B / 22B / 18B

goruby _

RankUserSizeTimeDateStatistics
1leonid320.27882008/12/09 08:54:280B / 14B / 18B
2murky-satyr360.25852008/12/09 04:24:490B / 16B / 18B
3leonid310.52912008/12/15 20:59:340B / 12B / 19B

Groovy _

RankUserSizeTimeDateStatistics
1murky-satyr9110.87952008/12/15 00:42:310B / 51B / 39B
2nn11010.90732008/12/15 00:26:090B / 58B / 49B
3murky-satyr703.58612009/12/01 01:15:010B / 49B / 21B

Logo _

RankUserSizeTimeDateStatistics
1teebee460.15582011/05/13 06:13:220B / 28B / 15B

Language Ranking_

RankLangUserSizeScore
1gs2whio2110000
2AWKnn287500
3JI., S.287500
4GolfScriptflagitious307000
5gorubyleonid316774
6xgawkllhuii316774
7Perl%20336363
8Arcyouz385526
9Rubyleonid425000
10BASIC*yuko*425000
11Fortran*yuko*434883
12Prologpooq444772
13REXXpooq444772
14Common LISPkozima454666
15Vimnn454666
16Logoteebee464565
17Asymptoteteebee603500
18PHPteebee613442
19JavaScriptTomac613442
20Octaveteebee633333
21Maximateebee643281
22Luamurky-satyr653230
23Pythonhallvabo663181
24CPurika683088
25Postscriptyshl(bin)683088
26R51b683088
27Tclmurky-satyr683088
28Groovymurky-satyr703000
29Pascaluru732876
30Schememurky-satyr752800
31OCamlksk832530
32Xtalteebee(pooq)882386
33D51b912307
34Iomurky-satyr922282
35Haskellnotogawa942234
36Forthzzo381091926
37Erlang51b1131858
38REBOLpooq1241693
39Javateebee1411489

return top