PHP Array Addition

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

The + operator returns the right-hand array appended to the left-hand array; for keys that exist in both arrays, the elements from the left-hand array will be used, and the matching elements from the right-hand array will be ignored.

Options

exec is denied

rejudge feature is enabled

6day(s) and 19:22:46 before deadline (12/10 12:06:08 JST), all source codes will be revealed after the deadline

Sample input:_

[] + [4, 2, 1, 0, 3, 0, 6]
[3, 9, 1, 6] + [4, 1, 0, 1, 0, 4, 8]
[] + [6]
[2] + []
[5, 0, 3] + []
[8, 9, 4, 7, 6, 1] + []
[9, 9, 6, 6, 2] + [1, 6, 4, 1, 9, 3, 2, 4]
[] + [3, 1, 0, 4, 7, 6]
[6, 1, 0, 5, 7, 2, 3] + [2]
[5, 1, 5, 3, 6, 6] + [1, 1, 5, 1, 8, 7, 5, 6]
[8, 5, 6] + [0, 8, 2]
[7, 1, 7, 2, 4, 9, 2, 2, 8, 0] + [8, 2, 6, 1, 0, 4, 6]
[2, 5, 2, 1, 2, 7, 3, 6, 2] + [0, 5, 0]
[5] + [2, 8, 0, 2, 8, 5, 3, 0, 4, 7]
[] + []
[0, 6, 9, 0, 3, 0, 0, 3, 0] + [0, 2]
[0, 3, 1, 0, 0, 4, 0, 0, 0, 3] + [0, 5, 2, 3, 0, 4, 7, 3]
[9, 0, 7, 6, 4, 9, 4, 6, 1, 5] + [3, 3]
[8] + [7, 4, 2, 7, 9, 2, 1, 3]
[5, 9, 9, 0, 2, 3, 3, 0, 2] + [2]
[8, 1, 8, 1, 4, 7, 5, 2, 2, 3] + []
[4, 8, 2, 5, 1, 0, 4, 1] + [1, 1, 4, 6, 5, 4, 5, 5, 0]
[9, 0, 0] + [1, 7, 5]
[5, 2, 8] + [5, 2, 5, 5, 7, 7, 1, 6, 2]
[6, 2, 3, 0, 4, 4, 9] + []

Sample output:

[4, 2, 1, 0, 3, 0, 6]
[3, 9, 1, 6, 0, 4, 8]
[6]
[2]
[5, 0, 3]
[8, 9, 4, 7, 6, 1]
[9, 9, 6, 6, 2, 3, 2, 4]
[3, 1, 0, 4, 7, 6]
[6, 1, 0, 5, 7, 2, 3]
[5, 1, 5, 3, 6, 6, 5, 6]
[8, 5, 6]
[7, 1, 7, 2, 4, 9, 2, 2, 8, 0]
[2, 5, 2, 1, 2, 7, 3, 6, 2]
[5, 8, 0, 2, 8, 5, 3, 0, 4, 7]
[]
[0, 6, 9, 0, 3, 0, 0, 3, 0]
[0, 3, 1, 0, 0, 4, 0, 0, 0, 3]
[9, 0, 7, 6, 4, 9, 4, 6, 1, 5]
[8, 4, 2, 7, 9, 2, 1, 3]
[5, 9, 9, 0, 2, 3, 3, 0, 2]
[8, 1, 8, 1, 4, 7, 5, 2, 2, 3]
[4, 8, 2, 5, 1, 0, 4, 1, 0]
[9, 0, 0]
[5, 2, 8, 5, 7, 7, 1, 6, 2]
[6, 2, 3, 0, 4, 4, 9]

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1rotary-o400.00892024/11/27 23:06:520B / 16B / 20B

Ruby2 _

RankUserSizeTimeDateStatistics
1rotary-o400.05712024/11/27 23:03:080B / 16B / 20B

Perl _

RankUserSizeTimeDateStatistics
1tails310.01782024/11/26 15:38:480B / 7B / 22B

Python3 _

RankUserSizeTimeDateStatistics
1xnor530.15282024/11/27 05:14:480B / 28B / 23B
2hallvabo580.04802024/11/27 08:25:160B / 29B / 28B
3fuzzylojik590.04832024/11/29 21:44:160B / 29B / 27B

iogii _

RankUserSizeTimeDateStatistics
1tails110.17642024/11/27 15:15:140B / 3B / 8B
2darrenks150.15502024/11/28 01:15:210B / ?B / ?B

C _

RankUserSizeTimeDateStatistics
1tails830.01372024/11/28 11:11:290B / 51B / 32B

sed _

RankUserSizeTimeDateStatistics
1tails440.01462024/11/28 09:47:310B / 6B / 31B
2McBusLuck1180.01482024/11/28 06:51:100B / 27B / 74B

GolfScript _

RankUserSizeTimeDateStatistics
1tails220.02642024/11/26 14:51:370B / 4B / 17B

gs2 _

RankUserSizeTimeDateStatistics
1tails120.07052024/11/26 12:54:113B / 5B / 4B

Nibbles _

RankUserSizeTimeDateStatistics
1tails90.02242024/11/26 14:30:206B / 1B / 2B

Lazy-K _

RankUserSizeTimeDateStatistics
1tails4920.02652024/11/29 11:39:350B / 265B / 227B

Universal Lambda _

RankUserSizeTimeDateStatistics
1tails470.04252024/11/29 11:22:3736B / 5B / 4B

Scala _

RankUserSizeTimeDateStatistics
1rotary-o714.20402024/11/28 23:23:090B / 47B / 22B

Language Ranking_

RankLangUserSizeScore
1Nibblestails910000
2iogiitails118181
3gs2tails127500
4GolfScripttails224090
5Perltails312903
6Ruby2rotary-o402250
7Rubyrotary-o402250
8sedtails442045
9Universal Lambdatails471914
10Python3xnor531698
11Scalarotary-o711267
12Ctails831084
13Lazy-Ktails492182

return to the top page