PHP Array Addition
Submit
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
now post-mortem time, all source codes will be revealed
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
Rank | User | Size | Time | Date | Statistics |
---|
1 | kaki | 37 | 0.0188 | 2024/12/09 13:22:43 | 0B / 10B / 24B |
2 | rotary-o | 37 | 0.0193 | 2024/12/09 22:40:27 | 0B / 10B / 24B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | kaki | 36 | 0.0587 | 2024/12/09 13:22:53 | 0B / 9B / 24B |
2 | rotary-o | 36 | 0.0573 | 2024/12/09 22:39:47 | 0B / 9B / 24B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 31 | 0.0178 | 2024/11/26 15:38:48 | 0B / 7B / 22B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | xnor | 53 | 0.1528 | 2024/11/27 05:14:48 | 0B / 28B / 23B |
2 | hallvabo | 58 | 0.0480 | 2024/11/27 08:25:16 | 0B / 29B / 28B |
3 | fuzzylojik | 59 | 0.0483 | 2024/11/29 21:44:16 | 0B / 29B / 27B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | kaki | 83 | 0.0876 | 2024/12/09 13:40:24 | 0B / 46B / 34B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 64 | 0.0076 | 2024/12/09 12:00:26 | 0B / 34B / 30B |
2 | rotary-o | 64 | 0.0086 | 2024/12/09 18:38:53 | 0B / 34B / 30B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 44 | 0.0146 | 2024/11/28 09:47:31 | 0B / 6B / 31B |
2 | McBusLuck | 44 | 0.0116 | 2024/12/07 17:59:22 | 0B / 5B / 34B |
3 | kaki | 49 | 0.0149 | 2024/12/09 14:58:36 | 0B / 6B / 37B |
4 | tails | 39 | 0.0159 | 2024/12/10 14:19:11 | 0B / 6B / 29B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 41 | 0.0201 | 2024/12/10 09:56:58 | 0B / 17B / 19B |
2 | McBusLuck | 70 | 0.0380 | 2024/12/10 08:33:16 | 0B / 19B / 42B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | rotary-o | 109 | 0.0164 | 2024/12/09 23:55:00 | 0B / 0B / 0B |
2 | %20 | 124 | 0.0230 | 2024/12/09 23:33:45 | 0B / 0B / 0B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 22 | 0.0264 | 2024/11/26 14:51:37 | 0B / 4B / 17B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 12 | 0.0705 | 2024/11/26 12:54:11 | 3B / 5B / 4B |
2 | whio | 12 | 0.0685 | 2024/12/07 00:20:32 | 3B / 5B / 4B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 492 | 0.0265 | 2024/11/29 11:39:35 | 0B / 265B / 227B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 47 | 0.0425 | 2024/11/29 11:22:37 | 36B / 5B / 4B |
Language Ranking_
Rank | Lang | User | Size | Score |
1 | Nibbles | tails | 9 | 10000 |
2 | gs2 | tails | 12 | 7500 |
3 | iogii | darrenks(tails,0.2) | 12 | 7500 |
4 | GolfScript | tails | 22 | 4090 |
5 | Perl | tails | 31 | 2903 |
6 | Ruby2 | kaki | 36 | 2500 |
7 | Ruby | kaki | 37 | 2432 |
8 | sed | tails | 39 | 2307 |
9 | Bash (builtins) | tails | 41 | 2195 |
10 | Universal Lambda | tails | 47 | 1914 |
11 | Python3 | xnor | 53 | 1698 |
12 | C | tails | 64 | 1406 |
13 | Scala | rotary-o | 71 | 1267 |
14 | Scheme | kaki | 83 | 1084 |
15 | Whitespace | rotary-o | 109 | 825 |
16 | Java | rotary-o | 127 | 708 |
17 | C# | rotary-o | 134 | 671 |
18 | Lazy-K | tails | 492 | 182 |
return to the top page