Factorization corrected

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 two numbers a and b, calculate x and y where x+y=a and x*y=b and x<=y.

Options

exec is denied

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

Sample input:_

1 0
3 2
5 6
7 12
9 20
11 30
13 42
15 56
17 72
9 0
0 0
2 1
4 4
6 9
8 16
10 25
12 36
14 49
16 64
18 81
17 42
107 1380
100 2275
168 7031
70 1216
72 1196
81 1634
111 2528
78 1400
103 1596
140 4899
132 3627
85 750
78 1160
146 4753
103 2596
32 60
94 1248
102 2480
106 1720
45 486
46 504
73 1260
135 4050
76 1219
88 1680
145 5254
61 910
111 3038
134 4389
94 1680
162 6417
158 5841
106 2793
162 6336
103 2052
112 2880
82 456
65 1050
82 1645
17 16
113 2640
185 8526
138 4361
96 2304
65 900
14 48
11 24
108 2795
144 5103
24 119
50 600
170 7189
137 4560
148 5332
24 63
9 20
90 344
92 1540
112 3120
74 1288
108 1620
73 1176
77 490
27 140
61 820
128 3471
48 407
95 2256
45 200
88 640
113 2850
159 6188
96 1575
89 1638
100 2356
57 770
129 3348
110 1581
81 80

Sample output:

0 1
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
0 9
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
3 14
15 92
35 65
79 89
32 38
26 46
38 43
32 79
28 50
19 84
69 71
39 93
10 75
20 58
49 97
44 59
2 30
16 78
40 62
20 86
18 27
18 28
28 45
45 90
23 53
28 60
71 74
26 35
49 62
57 77
24 70
69 93
59 99
49 57
66 96
27 76
40 72
6 76
30 35
35 47
1 16
33 80
87 98
49 89
48 48
20 45
6 8
3 8
43 65
63 81
7 17
20 30
79 91
57 80
62 86
3 21
4 5
4 86
22 70
52 60
28 46
18 90
24 49
7 70
7 20
20 41
39 89
11 37
47 48
5 40
8 80
38 75
68 91
21 75
26 63
38 62
22 35
36 93
17 93
1 80

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1yvl580.48922010/05/27 20:20:200B / 24B / 31B
2uru590.06022010/05/27 20:02:500B / 25B / 29B
3primo660.01982010/05/24 22:06:210B / 29B / 34B
4murky-satyr670.01452010/05/25 18:41:240B / 32B / 30B
5msk740.02092010/05/24 23:26:330B / 35B / 35B

Perl _

RankUserSizeTimeDateStatistics
1tybalt89470.00022010/06/05 06:14:110B / ?B / ?B
2nai490.00242010/05/25 17:25:400B / 17B / 29B
3ySas500.04412010/05/24 22:41:480B / 14B / 34B
4primo510.00242010/05/24 10:42:390B / 17B / 31B
5dcutter550.01942010/05/28 02:46:120B / 15B / 36B

Python _

RankUserSizeTimeDateStatistics
1primo770.02582010/05/24 09:42:410B / 46B / 29B
2hallvabo770.02452010/05/31 10:42:320B / 46B / 29B
3kt3k770.00502010/05/31 22:34:320B / 43B / 32B
4croyal2790.13852010/06/03 06:03:410B / ?B / ?B

PHP _

RankUserSizeTimeDateStatistics
1primo730.03992010/05/24 10:20:134B / 33B / 34B
2o-cn730.04002010/05/25 01:13:194B / 33B / 34B

Common LISP _

RankUserSizeTimeDateStatistics
1quijote800.08592010/05/31 19:42:580B / 38B / 33B
2youz810.10812010/05/23 00:19:420B / 39B / 36B
3kozima810.09242010/05/23 18:16:430B / 40B / 31B
4kozima(quijote)790.08352010/06/06 18:54:490B / 38B / 31B

Arc _

RankUserSizeTimeDateStatistics
1murky-satyr642.01772010/05/23 10:56:550B / 28B / 30B
2youz651.98222010/05/23 00:32:030B / 28B / 32B

Clojure _

RankUserSizeTimeDateStatistics
1murky-satyr801.84192010/05/27 06:40:220B / 42B / 32B

Io _

RankUserSizeTimeDateStatistics
1pooq1040.18732011/01/27 18:00:120B / 71B / 28B

JavaScript _

RankUserSizeTimeDateStatistics
1murky-satyr650.00842010/05/27 00:39:530B / 35B / 29B
2nn650.00932010/05/27 14:06:370B / 35B / 29B
3o-cn650.01402010/05/27 22:31:240B / 35B / 29B
4yvl690.00402010/05/26 19:43:340B / 40B / 28B

Lua _

RankUserSizeTimeDateStatistics
1murky-satyr720.03572010/05/27 01:04:420B / 38B / 30B
2zetamatta910.00012010/05/30 16:54:515B / ?B / ?B

BASIC _

RankUserSizeTimeDateStatistics
1*yuko*440.00212010/05/23 09:47:070B / 24B / 20B

J _

RankUserSizeTimeDateStatistics
1I., S.350.05662011/01/04 20:46:550B / 8B / 26B
2pooq470.03742010/11/17 23:56:580B / 15B / 29B

C _

RankUserSizeTimeDateStatistics
1nai790.00072010/06/05 20:18:180B / ?B / ?B
2yvl800.00072010/05/26 19:35:270B / 41B / 38B
3nn800.00072010/05/26 22:41:130B / 40B / 39B
4msk810.00072010/05/24 22:26:130B / 41B / 39B
5not810.00072010/05/27 08:38:570B / 40B / 40B
6inaniwa820.00072010/05/24 08:04:070B / 41B / 40B
7hallvabo850.00062010/05/31 11:08:000B / 42B / 42B
8fill1030.00072010/06/05 13:38:240B / ?B / ?B
9Maedhros7771210.00312010/05/24 01:22:290B / ?B / ?B
10nai740.01072012/08/31 08:48:390B / 38B / 35B
11Raider790.00072010/06/15 03:21:590B / ?B / ?B

C++ _

RankUserSizeTimeDateStatistics
1nn980.00072010/05/29 22:23:040B / 50B / 45B

OCaml _

RankUserSizeTimeDateStatistics
1m.ukai1120.02322010/09/01 20:04:280B / 64B / 39B

Haskell _

RankUserSizeTimeDateStatistics
1rst76990.00562010/05/26 07:13:500B / 56B / 39B
2notogawa990.00562010/05/26 07:49:560B / 56B / 39B
3koyama41990.00582010/05/26 19:49:040B / 55B / 40B
4henkma990.00802010/05/26 21:33:090B / 63B / 33B
5tanakh1000.00562010/05/23 04:13:070B / 55B / 41B
6pi80271040.00572010/05/26 18:35:260B / 64B / 38B

Java _

RankUserSizeTimeDateStatistics
1hallvabo1720.17732010/05/31 11:03:130B / 115B / 52B
2teebee1600.19152011/06/06 09:50:100B / 100B / 53B

Pascal _

RankUserSizeTimeDateStatistics
1*yuko*940.00092010/05/23 11:45:290B / 62B / 29B
2uru940.00102010/05/23 12:20:040B / 63B / 24B

Fortran _

RankUserSizeTimeDateStatistics
1*yuko*640.00122010/05/23 09:51:390B / 36B / 27B
2*yuko*610.00592012/11/04 10:28:580B / 34B / 26B

C# _

RankUserSizeTimeDateStatistics
1darefilz2320.10862010/05/26 17:12:160B / 138B / 84B

Maxima _

RankUserSizeTimeDateStatistics
1pooq820.74542011/12/20 05:42:420B / 37B / 42B

Asymptote _

RankUserSizeTimeDateStatistics
1teebee830.14732011/12/20 07:52:160B / 46B / 35B

AWK _

RankUserSizeTimeDateStatistics
1nn320.00112010/05/27 13:37:230B / 12B / 20B

Postscript _

RankUserSizeTimeDateStatistics
1ySas630.15302010/05/26 10:31:1125B / 22B / 15B

R _

RankUserSizeTimeDateStatistics
1seichung850.33562010/06/01 00:52:250B / 45B / 38B

GolfScript _

RankUserSizeTimeDateStatistics
1nn300.21502010/05/29 20:40:390B / 4B / 25B
2narb310.67762010/05/27 10:33:470B / 5B / 25B
3yvl310.23442010/05/28 02:26:020B / 9B / 21B

Vim _

RankUserSizeTimeDateStatistics
1nn750.18992010/05/25 00:42:052B / 41B / 26B

goruby _

RankUserSizeTimeDateStatistics
1murky-satyr550.07922010/05/25 18:41:580B / 23B / 30B

Groovy _

RankUserSizeTimeDateStatistics
1murky-satyr832.20952010/05/27 00:52:320B / 49B / 31B
2nn832.25722010/05/27 14:46:030B / 50B / 32B

Logo _

RankUserSizeTimeDateStatistics
1teebee580.02182011/06/06 10:17:560B / 32B / 20B

Language Ranking_

RankLangUserSizeScore
1GolfScriptnn3010000
2AWKnn329375
3JI., S.358571
4BASIC*yuko*446818
5Perltybalt89476382
6gorubymurky-satyr555454
7Rubyyvl585172
8Logoteebee585172
9Fortran*yuko*614918
10PostscriptySas634761
11Arcmurky-satyr644687
12JavaScriptmurky-satyr654615
13Luamurky-satyr724166
14PHPprimo734109
15Cnai744054
16Vimnn754000
17Pythonprimo773896
18Common LISPkozima(quijote)793797
19Clojuremurky-satyr803750
20Maximapooq823658
21Groovymurky-satyr833614
22Asymptoteteebee833614
23Rseichung853529
24Pascal*yuko*943191
25C++nn983061
26Haskellrst76993030
27Iopooq1042884
28OCamlm.ukai1122678
29Javateebee1601875
30C#darefilz2321293

return top