#43. mapAB3
mapAB3
Background
Description
Modify and return the given map as follows: if exactly one of the keys "a" or "b" has a value in the map (but not both), set the other to have that same value in the map.
Format
Input
Output
Samples
"a": "aaa" "c": "cake"
{"a": "aaa", "b": "aaa", "c": "cake"}
"b": "bbb" "c": "cake"
{"a": "bbb", "b": "bbb", "c": "cake"}
"a": "aaa" "b": "bbb" "c": "cake"
{"a": "aaa", "b": "bbb", "c": "cake"}
Limitation
1s, 1024KiB for each test case.