Four Number Game

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

http://demonstrations.wolfram.com/TheFourNumberGame/

Options

exec is denied

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

Sample input:_

0 37 105 230
0 125 355 778
0 423 1201 2632
81 97 347 656
0 16377 46499 101902
0 11 31 68
954 369 987 396
0 187427 532159 1166220
0 1431 4063 8904
163 688 514 83
295 104 899 151
927 0 2632 5768
16 608 835 383
0 55403 157305 344732
0 3 9 20
14 272 199 28
228 193 240 667
81 149 274 504
793 298 2 505
187 66 709 999
0 7256527 20603361 45152016
448 67 247 316
0 4841 13745 30122
0 2145013 6090307 13346834
927 2632 0 5768
0 1 1 2
0 634061 1800281 3945294
0 927 2632 5768
0 1 3 6
0 653 1854 4063

Sample output:

0 37 105 230
37 68 125 230
31 57 105 193
26 48 88 162
22 40 74 136
18 34 62 114
16 28 52 96
12 24 44 80
12 20 36 68
8 16 32 56
8 16 24 48
8 8 24 40
0 16 16 32
16 0 16 32
16 16 16 16
0 0 0 0

0 125 355 778
125 230 423 778
105 193 355 653
88 162 298 548
74 136 250 460
62 114 210 386
52 96 176 324
44 80 148 272
36 68 124 228
32 56 104 192
24 48 88 160
24 40 72 136
16 32 64 112
16 32 48 96
16 16 48 80
0 32 32 64
32 0 32 64
32 32 32 32
0 0 0 0

0 423 1201 2632
423 778 1431 2632
355 653 1201 2209
298 548 1008 1854
250 460 846 1556
210 386 710 1306
176 324 596 1096
148 272 500 920
124 228 420 772
104 192 352 648
88 160 296 544
72 136 248 456
64 112 208 384
48 96 176 320
48 80 144 272
32 64 128 224
32 64 96 192
32 32 96 160
0 64 64 128
64 0 64 128
64 64 64 64
0 0 0 0

81 97 347 656
16 250 309 575
234 59 266 559
175 207 293 325
32 86 32 150
54 54 118 118
0 64 0 64
64 64 64 64
0 0 0 0

0 16377 46499 101902
16377 30122 55403 101902
13745 25281 46499 85525
11536 21218 39026 71780
9682 17808 32754 60244
8126 14946 27490 50562
6820 12544 23072 42436
5724 10528 19364 35616
4804 8836 16252 29892
4032 7416 13640 25088
3384 6224 11448 21056
2840 5224 9608 17672
2384 4384 8064 14832
2000 3680 6768 12448
1680 3088 5680 10448
1408 2592 4768 8768
1184 2176 4000 7360
992 1824 3360 6176
832 1536 2816 5184
704 1280 2368 4352
576 1088 1984 3648
512 896 1664 3072
384 768 1408 2560
384 640 1152 2176
256 512 1024 1792
256 512 768 1536
256 256 768 1280
0 512 512 1024
512 0 512 1024
512 512 512 512
0 0 0 0

0 11 31 68
11 20 37 68
9 17 31 57
8 14 26 48
6 12 22 40
6 10 18 34
4 8 16 28
4 8 12 24
4 4 12 20
0 8 8 16
8 0 8 16
8 8 8 8
0 0 0 0

954 369 987 396
585 618 591 558
33 27 33 27
6 6 6 6
0 0 0 0

0 187427 532159 1166220
187427 344732 634061 1166220
157305 289329 532159 978793
132024 242830 446634 821488
110806 203804 374854 689464
92998 171050 314610 578658
78052 143560 264048 485660
65508 120488 221612 407608
54980 101124 185996 342100
46144 84872 156104 287120
38728 71232 131016 240976
32504 59784 109960 202248
27280 50176 92288 169744
22896 42112 77456 142464
19216 35344 65008 119568
16128 29664 54560 100352
13536 24896 45792 84224
11360 20896 38432 70688
9536 17536 32256 59328
8000 14720 27072 49792
6720 12352 22720 41792
5632 10368 19072 35072
4736 8704 16000 29440
3968 7296 13440 24704
3328 6144 11264 20736
2816 5120 9472 17408
2304 4352 7936 14592
2048 3584 6656 12288
1536 3072 5632 10240
1536 2560 4608 8704
1024 2048 4096 7168
1024 2048 3072 6144
1024 1024 3072 5120
0 2048 2048 4096
2048 0 2048 4096
2048 2048 2048 2048
0 0 0 0

0 1431 4063 8904
1431 2632 4841 8904
1201 2209 4063 7473
1008 1854 3410 6272
846 1556 2862 5264
710 1306 2402 4418
596 1096 2016 3708
500 920 1692 3112
420 772 1420 2612
352 648 1192 2192
296 544 1000 1840
248 456 840 1544
208 384 704 1296
176 320 592 1088
144 272 496 912
128 224 416 768
96 192 352 640
96 160 288 544
64 128 256 448
64 128 192 384
64 64 192 320
0 128 128 256
128 0 128 256
128 128 128 128
0 0 0 0

163 688 514 83
525 174 431 80
351 257 351 445
94 94 94 94
0 0 0 0

295 104 899 151
191 795 748 144
604 47 604 47
557 557 557 557
0 0 0 0

927 0 2632 5768
927 2632 3136 4841
1705 504 1705 3914
1201 1201 2209 2209
0 1008 0 1008
1008 1008 1008 1008
0 0 0 0

16 608 835 383
592 227 452 367
365 225 85 225
140 140 140 140
0 0 0 0

0 55403 157305 344732
55403 101902 187427 344732
46499 85525 157305 289329
39026 71780 132024 242830
32754 60244 110806 203804
27490 50562 92998 171050
23072 42436 78052 143560
19364 35616 65508 120488
16252 29892 54980 101124
13640 25088 46144 84872
11448 21056 38728 71232
9608 17672 32504 59784
8064 14832 27280 50176
6768 12448 22896 42112
5680 10448 19216 35344
4768 8768 16128 29664
4000 7360 13536 24896
3360 6176 11360 20896
2816 5184 9536 17536
2368 4352 8000 14720
1984 3648 6720 12352
1664 3072 5632 10368
1408 2560 4736 8704
1152 2176 3968 7296
1024 1792 3328 6144
768 1536 2816 5120
768 1280 2304 4352
512 1024 2048 3584
512 1024 1536 3072
512 512 1536 2560
0 1024 1024 2048
1024 0 1024 2048
1024 1024 1024 1024
0 0 0 0

0 3 9 20
3 6 11 20
3 5 9 17
2 4 8 14
2 4 6 12
2 2 6 10
0 4 4 8
4 0 4 8
4 4 4 4
0 0 0 0

14 272 199 28
258 73 171 14
185 98 157 244
87 59 87 59
28 28 28 28
0 0 0 0

228 193 240 667
35 47 427 439
12 380 12 404
368 368 392 392
0 24 0 24
24 24 24 24
0 0 0 0

81 149 274 504
68 125 230 423
57 105 193 355
48 88 162 298
40 74 136 250
34 62 114 210
28 52 96 176
24 44 80 148
20 36 68 124
16 32 56 104
16 24 48 88
8 24 40 72
16 16 32 64
0 16 32 48
16 16 16 48
0 0 32 32
0 32 0 32
32 32 32 32
0 0 0 0

793 298 2 505
495 296 503 288
199 207 215 207
8 8 8 8
0 0 0 0

187 66 709 999
121 643 290 812
522 353 522 691
169 169 169 169
0 0 0 0

0 7256527 20603361 45152016
7256527 13346834 24548655 45152016
6090307 11201821 20603361 37895489
5111514 9401540 17292128 31805182
4290026 7890588 14513054 26693668
3600562 6622466 12180614 22403642
3021904 5558148 10223028 18803080
2536244 4664880 8580052 15781176
2128636 3915172 7201124 13244932
1786536 3285952 6043808 11116296
1499416 2757856 5072488 9329760
1258440 2314632 4257272 7830344
1056192 1942640 3573072 6571904
886448 1630432 2998832 5515712
743984 1368400 2516880 4629264
624416 1148480 2112384 3885280
524064 963904 1772896 3260864
439840 808992 1487968 2736800
369152 678976 1248832 2296960
309824 569856 1048128 1927808
260032 478272 879680 1617984
218240 401408 738304 1357952
183168 336896 619648 1139712
153728 282752 520064 956544
129024 237312 436480 802816
108288 199168 366336 673792
90880 167168 307456 565504
76288 140288 258048 474624
64000 117760 216576 398336
53760 98816 181760 334336
45056 82944 152576 280576
37888 69632 128000 235520
31744 58368 107520 197632
26624 49152 90112 165888
22528 40960 75776 139264
18432 34816 63488 116736
16384 28672 53248 98304
12288 24576 45056 81920
12288 20480 36864 69632
8192 16384 32768 57344
8192 16384 24576 49152
8192 8192 24576 40960
0 16384 16384 32768
16384 0 16384 32768
16384 16384 16384 16384
0 0 0 0

448 67 247 316
381 180 69 132
201 111 63 249
90 48 186 48
42 138 138 42
96 0 96 0
96 96 96 96
0 0 0 0

0 4841 13745 30122
4841 8904 16377 30122
4063 7473 13745 25281
3410 6272 11536 21218
2862 5264 9682 17808
2402 4418 8126 14946
2016 3708 6820 12544
1692 3112 5724 10528
1420 2612 4804 8836
1192 2192 4032 7416
1000 1840 3384 6224
840 1544 2840 5224
704 1296 2384 4384
592 1088 2000 3680
496 912 1680 3088
416 768 1408 2592
352 640 1184 2176
288 544 992 1824
256 448 832 1536
192 384 704 1280
192 320 576 1088
128 256 512 896
128 256 384 768
128 128 384 640
0 256 256 512
256 0 256 512
256 256 256 256
0 0 0 0

0 2145013 6090307 13346834
2145013 3945294 7256527 13346834
1800281 3311233 6090307 11201821
1510952 2779074 5111514 9401540
1268122 2332440 4290026 7890588
1064318 1957586 3600562 6622466
893268 1642976 3021904 5558148
749708 1378928 2536244 4664880
629220 1157316 2128636 3915172
528096 971320 1786536 3285952
443224 815216 1499416 2757856
371992 684200 1258440 2314632
312208 574240 1056192 1942640
262032 481952 886448 1630432
219920 404496 743984 1368400
184576 339488 624416 1148480
154912 284928 524064 963904
130016 239136 439840 808992
109120 200704 369152 678976
91584 168448 309824 569856
76864 141376 260032 478272
64512 118656 218240 401408
54144 99584 183168 336896
45440 83584 153728 282752
38144 70144 129024 237312
32000 58880 108288 199168
26880 49408 90880 167168
22528 41472 76288 140288
18944 34816 64000 117760
15872 29184 53760 98816
13312 24576 45056 82944
11264 20480 37888 69632
9216 17408 31744 58368
8192 14336 26624 49152
6144 12288 22528 40960
6144 10240 18432 34816
4096 8192 16384 28672
4096 8192 12288 24576
4096 4096 12288 20480
0 8192 8192 16384
8192 0 8192 16384
8192 8192 8192 8192
0 0 0 0

927 2632 0 5768
1705 2632 5768 4841
927 3136 927 3136
2209 2209 2209 2209
0 0 0 0

0 1 1 2
1 0 1 2
1 1 1 1
0 0 0 0

0 634061 1800281 3945294
634061 1166220 2145013 3945294
532159 978793 1800281 3311233
446634 821488 1510952 2779074
374854 689464 1268122 2332440
314610 578658 1064318 1957586
264048 485660 893268 1642976
221612 407608 749708 1378928
185996 342100 629220 1157316
156104 287120 528096 971320
131016 240976 443224 815216
109960 202248 371992 684200
92288 169744 312208 574240
77456 142464 262032 481952
65008 119568 219920 404496
54560 100352 184576 339488
45792 84224 154912 284928
38432 70688 130016 239136
32256 59328 109120 200704
27072 49792 91584 168448
22720 41792 76864 141376
19072 35072 64512 118656
16000 29440 54144 99584
13440 24704 45440 83584
11264 20736 38144 70144
9472 17408 32000 58880
7936 14592 26880 49408
6656 12288 22528 41472
5632 10240 18944 34816
4608 8704 15872 29184
4096 7168 13312 24576
3072 6144 11264 20480
3072 5120 9216 17408
2048 4096 8192 14336
2048 4096 6144 12288
2048 2048 6144 10240
0 4096 4096 8192
4096 0 4096 8192
4096 4096 4096 4096
0 0 0 0

0 927 2632 5768
927 1705 3136 5768
778 1431 2632 4841
653 1201 2209 4063
548 1008 1854 3410
460 846 1556 2862
386 710 1306 2402
324 596 1096 2016
272 500 920 1692
228 420 772 1420
192 352 648 1192
160 296 544 1000
136 248 456 840
112 208 384 704
96 176 320 592
80 144 272 496
64 128 224 416
64 96 192 352
32 96 160 288
64 64 128 256
0 64 128 192
64 64 64 192
0 0 128 128
0 128 0 128
128 128 128 128
0 0 0 0

0 1 3 6
1 2 3 6
1 1 3 5
0 2 2 4
2 0 2 4
2 2 2 2
0 0 0 0

0 653 1854 4063
653 1201 2209 4063
548 1008 1854 3410
460 846 1556 2862
386 710 1306 2402
324 596 1096 2016
272 500 920 1692
228 420 772 1420
192 352 648 1192
160 296 544 1000
136 248 456 840
112 208 384 704
96 176 320 592
80 144 272 496
64 128 224 416
64 96 192 352
32 96 160 288
64 64 128 256
0 64 128 192
64 64 64 192
0 0 128 128
0 128 0 128
128 128 128 128
0 0 0 0

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1leonid700.02602012/01/22 04:24:430B / 34B / 33B
2uru930.04532012/02/03 22:48:310B / 48B / 39B

Perl _

RankUserSizeTimeDateStatistics
1tails480.01712012/01/23 21:55:340B / 22B / 24B
2teebee480.03092012/01/24 03:18:110B / 22B / 25B
3tybalt89480.07312012/01/30 07:06:340B / ?B / ?B
4Hem590.07382012/01/24 19:23:430B / 25B / 31B

Python _

RankUserSizeTimeDateStatistics
1leonid1130.02982012/01/22 12:35:210B / 69B / 35B
2hallvabo1190.02812012/01/25 08:02:460B / 71B / 39B
3recursive1190.02292012/01/25 08:12:580B / 71B / 39B
4Hendrik1240.02812012/02/04 08:20:170B / 73B / 39B

PHP _

RankUserSizeTimeDateStatistics
1primo1120.12492012/01/22 17:30:021B / 50B / 60B
2clock1120.02652012/01/26 23:52:524B / 51B / 56B

Scheme _

RankUserSizeTimeDateStatistics
1kaki1310.04612012/01/22 07:20:490B / 49B / 66B
2kaki1270.01952013/03/25 05:58:560B / 44B / 71B

Io _

RankUserSizeTimeDateStatistics
1pooq1730.18772012/11/22 15:55:260B / 117B / 48B

JavaScript _

RankUserSizeTimeDateStatistics
1nn1120.04752012/02/04 10:51:540B / 59B / 52B
2hakusui1150.03582012/01/26 00:45:330B / 59B / 54B
3clock1180.02272012/01/27 01:02:360B / 60B / 56B

Lua _

RankUserSizeTimeDateStatistics
1Hendrik1600.01682012/02/04 22:52:310B / 89B / 63B
2pooq1630.01612012/02/04 13:12:290B / 89B / 67B
3pooq(Hendrik)1550.08862012/02/05 07:43:560B / 86B / 62B

BASIC _

RankUserSizeTimeDateStatistics
1pooq1110.01492012/01/23 19:24:310B / 68B / 30B

J _

RankUserSizeTimeDateStatistics
1I., S.330.21722012/01/24 23:24:490B / 10B / 23B
2I., S.(try/catch)350.03292012/02/03 19:44:570B / 8B / 26B
3I., S.(ugly)320.03532012/02/06 07:30:010B / 8B / 24B

C _

RankUserSizeTimeDateStatistics
1inaniwa1300.01472012/02/02 08:09:130B / 61B / 66B
2not1340.01312012/01/25 23:14:380B / 68B / 63B
3nn1340.01602012/01/31 07:41:330B / 68B / 63B
4fill1340.01662012/02/01 23:12:060B / 68B / 63B

Haskell _

RankUserSizeTimeDateStatistics
1henkma1200.02902012/02/03 19:47:070B / 73B / 39B
2notogawa1210.05732012/02/02 00:24:340B / 87B / 26B

Pascal _

RankUserSizeTimeDateStatistics
1*yuko*1570.01332012/02/04 06:15:320B / 96B / 53B
2uru1620.01462012/02/04 20:58:130B / 98B / 59B
3uru(*yuko*)1550.01382012/02/05 11:01:070B / 96B / 51B

Fortran _

RankUserSizeTimeDateStatistics
1*yuko*1010.01542012/01/22 13:20:010B / 63B / 31B
2*yuko*980.06612012/02/05 10:07:340B / 63B / 28B

Maxima _

RankUserSizeTimeDateStatistics
1pooq1460.59342012/02/04 21:13:050B / 82B / 56B

AWK _

RankUserSizeTimeDateStatistics
1nn850.01432012/11/19 01:08:360B / 35B / 49B

wake _

RankUserSizeTimeDateStatistics
1clock1630.44922012/01/25 01:33:480B / 44B / 103B

dc _

RankUserSizeTimeDateStatistics
1tails910.04572012/02/04 22:59:550B / 75B / 16B

R _

RankUserSizeTimeDateStatistics
1pooq1180.18102012/02/04 20:14:030B / 62B / 52B

GolfScript _

RankUserSizeTimeDateStatistics
1tails420.24942012/01/22 13:59:550B / 11B / 30B
2clock450.55352012/02/01 03:39:320B / 10B / 34B
3tails410.26862012/02/05 05:14:370B / 8B / 32B

Vim _

RankUserSizeTimeDateStatistics
1clock560.68702012/01/24 22:53:204B / 30B / 20B

Groovy _

RankUserSizeTimeDateStatistics
1nn1231.28982012/02/04 13:54:080B / 67B / 52B
2hakusui1342.80532012/01/26 08:30:060B / 76B / 57B

Language Ranking_

RankLangUserSizeScore
1JI., S.(ugly)3210000
2GolfScripttails417804
3Perltails486666
4Vimclock565714
5Rubyleonid704571
6AWKnn853764
7dctails913516
8Fortran*yuko*983265
9BASICpooq1112882
10PHPprimo1122857
11JavaScriptnn1122857
12Pythonleonid1132831
13Rpooq1182711
14Haskellhenkma1202666
15Groovynn1232601
16Schemekaki1272519
17Cinaniwa1302461
18Maximapooq1462191
19Luapooq(Hendrik)1552064
20Pascaluru(*yuko*)1552064
21wakeclock1631963
22Iopooq1731849

return top