Merge Digits

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

Merge two sequences of digits in each line,
preserving the order of the digits in each sequence,
and maximize the resulting number.

-- tails

Options

exec is denied

rejudge feature is enabled

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

Sample input:_

97531 86420
13579 24680
10000 10000
55584 55557
33341 33533
22923 22299
42351 42353
85623 75627
11812 32118
37373 37377

Sample output:

9876543210
2468135790
1100000000
5558555574
3353334331
2292322299
4423532351
8756562723
3211812118
3737737373

Sample input:_

46752273209 28984199805
54566545366 48894723158
81951694143 52365465153
96036965470 88758006460
25070466854 77003201209
12797417562 46270289378
45888354364 43135176974
58400287713 91779912871
31194332625 28478705353
52931626237 32695653407
54893711816 79159140258
23001105995 99708838875
24977482709 88269879583
26749333549 24416126115
66424506292 18133078866
92069889890 47773751475
61045526892 24373470443
71978531488 53915422295
29196942031 65032772325
55071572561 15579312227
63850009109 53883300471
30410923851 73849622356
36387162989 12996958273
97347160013 81915888923
61932062680 28546408442
99918154982 56035922600
43255832812 85221825856
78994340662 65459469395
79121919519 66908325734
11470547570 11750538372

Sample output:

4675289842273219980905
5488947456654536623158
8523654651951694153143
9887658036965470064600
7725070466854003201209
4627127974175620289378
4588843543643135176974
9584177991287100287713
3284787119433262505353
5329326956534162623707
7954893715914118160258
9972308838875001105995
8826987958324977482709
2674933354924416126115
6642451813307886606292
9477737521475069889890
6243734710455268920443
7539197853154222951488
6529196942032772325031
5515579312227071572561
6538838533004710009109
7384963223560410923851
3638716298912996958273
9873471916158889230013
6285464193208442062680
9995618154982035922600
8543255832822182585612
7899654594694395340662
7966912191951908325734
1175114705475705383720

Sample input:_

25155443353 24111355531
35524143453 55534523143
52241111123 31221122124
23445154245 23521323452
25211332344 21415111211
33455315315 13322411554
43322451254 43235444422
25523153511 21254112315
45535431332 13534123444
23424441224 42252342154
44143221533 14144311543
24545124155 12242532313
33311543341 33113151555
44451213353 12331542345
33531412542 31532142525
32141115123 24512542143
32421321241 13521443131
33315332313 55433434442
15143442252 24341233312
44245221453 51451224513
33444241322 43345433431
33525551441 15515314122
22241224452 21413313521
21442321413 14253123341
35232442133 35542253331
41122143253 11113141442
33141433413 32255124351
42352544144 24445434433
24351454112 34114531355
11425542525 11255533322

Sample output:

2524155443353111355531
5553553452423143453143
5322412211221241111123
2352344521542451323452
2522141511332344111211
3345531531513322411554
4433323544442245221254
2552321535125411231511
4553543135341332123444
4234244422523421541224
4414322153314144311543
2454512415512242532313
3333311543341131515551
4445123315423451213353
3353315321425251412542
3245214125421431115123
3242135214431321312411
5543343444333215332313
2434151434422521233312
5442452214531451224513
4334543344433432413221
3352555155153144141221
2224214133135212244521
2144232142531413123341
3554352324422533321331
4112214325311113141442
3332255141433413124351
4244454344332352544144
3424351454114531355112
1142554252511255533322

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1Histocrat380.04972016/04/15 11:23:240B / 21B / 15B

Ruby2 _

RankUserSizeTimeDateStatistics
1Histocrat360.29192016/04/15 11:59:400B / 20B / 14B
2kimiyuki550.20432016/04/16 06:55:070B / 27B / 26B

Perl _

RankUserSizeTimeDateStatistics
1teebee420.04932016/04/16 03:27:170B / 17B / 23B
2llhuii420.04722016/04/16 09:45:290B / 17B / 23B
3tails450.03522016/04/18 18:30:210B / 19B / 24B
4kimiyuki760.05772016/04/19 11:08:150B / 37B / 39B

Python _

RankUserSizeTimeDateStatistics
1llhuii780.65332016/04/18 00:28:540B / 43B / 35B
2mitchs780.17572016/04/18 00:44:030B / 43B / 35B
3twobit780.25112016/04/18 08:33:370B / ?B / ?B
4xsot790.29692016/04/19 11:34:330B / 43B / 36B
5xnor820.09362016/04/20 08:38:310B / ?B / ?B
6hallvabo830.10382016/04/21 22:52:070B / 53B / 29B
7Sp3000890.40812016/04/16 21:57:290B / 50B / 37B
8rolf1560.11532016/04/16 05:20:020B / 86B / 51B

Python3 _

RankUserSizeTimeDateStatistics
1llhuii760.57092016/04/19 01:22:010B / 41B / 31B
2mitchs770.24742016/04/19 11:30:530B / 42B / 26B
3xsot810.19792016/04/16 20:05:520B / 51B / 26B

JavaScript _

RankUserSizeTimeDateStatistics
1teebee880.05232016/04/16 04:45:300B / 47B / 40B
2Jakzo920.07172016/04/20 10:39:460B / 45B / 46B
3ETHproductions940.08142016/04/16 01:09:070B / 47B / 46B

Lua _

RankUserSizeTimeDateStatistics
1twobit1200.05562016/04/18 22:10:340B / ?B / ?B

J _

RankUserSizeTimeDateStatistics
1I., S.520.07882016/04/29 14:22:010B / 17B / 35B

K _

RankUserSizeTimeDateStatistics
1teebee360.09432016/04/17 09:09:220B / 7B / 27B

C _

RankUserSizeTimeDateStatistics
1nu900.03902016/04/29 01:54:220B / 47B / 43B
2nu(another)900.03552016/04/29 10:33:050B / 46B / 44B
3tails910.03192016/04/28 17:31:510B / 45B / 46B
4llhuii940.03182016/04/19 22:43:510B / 50B / 44B
5twobit970.03892016/04/20 00:19:100B / ?B / ?B
6satos970.03212016/04/28 02:11:590B / 51B / 46B
7chocobi1090.03212016/04/21 21:33:400B / 56B / 52B
8kimiyuki1260.03212016/04/27 23:23:430B / 66B / 60B
9tails (nu)850.03182017/08/08 19:05:470B / 41B / 44B
10nu(tails)860.03222016/04/30 02:40:330B / 42B / 44B
11nu870.03262016/04/30 02:38:340B / 45B / 42B

Haskell _

RankUserSizeTimeDateStatistics
1henkma850.04142016/04/23 10:14:210B / 50B / 32B
2dianne790.03792018/06/21 05:33:260B / 46B / 30B

Java _

RankUserSizeTimeDateStatistics
1teebee2120.29502016/04/17 20:25:210B / 132B / 74B

AWK _

RankUserSizeTimeDateStatistics
1llhuii550.03262016/04/20 00:03:290B / 25B / 30B
2teebee580.03362016/04/17 01:05:210B / 24B / 34B

sed _

RankUserSizeTimeDateStatistics
1tails1080.38792016/04/16 00:32:230B / 25B / 69B
2%201150.29702016/04/15 15:49:180B / 30B / 75B
3mitchs (tails)1050.32072016/04/29 11:28:030B / 23B / 67B

dc _

RankUserSizeTimeDateStatistics
1tails630.07672016/04/21 16:24:170B / 46B / 17B

xgawk _

RankUserSizeTimeDateStatistics
1mitchs (llhuii)530.03492016/04/29 13:32:190B / 24B / 29B

Brainfuck _

RankUserSizeTimeDateStatistics
1mitchs1850.11482016/04/29 09:06:180B / 0B / 185B

Whitespace _

RankUserSizeTimeDateStatistics
1kaz_u2540.21742016/04/29 10:17:040B / 0B / 0B

GolfScript _

RankUserSizeTimeDateStatistics
1tails210.12192016/04/21 10:14:490B / 2B / 19B
2twobit270.18592016/04/17 22:56:360B / ?B / ?B

gs2 _

RankUserSizeTimeDateStatistics
1mitchs130.31202016/04/24 18:03:346B / 4B / 3B

goruby _

RankUserSizeTimeDateStatistics
1mitchs260.15602016/04/15 23:26:130B / 13B / 11B

Language Ranking_

RankLangUserSizeScore
1gs2mitchs1310000
2GolfScripttails216190
3gorubymitchs265000
4Ruby2Histocrat363611
5Kteebee363611
6RubyHistocrat383421
7Perlteebee423095
8JI., S.522500
9xgawkmitchs (llhuii)532452
10AWKllhuii552363
11dctails632063
12Python3llhuii761710
13Pythonllhuii781666
14Haskelldianne791645
15Ctails (nu)851529
16JavaScriptteebee881477
17sedmitchs (tails)1051238
18Luatwobit1201083
19Brainfuckmitchs185702
20Javateebee212613
21Whitespacekaz_u254511

return to the top page