#40. topping2
topping2
Background
Description
Given a map of food keys and their topping values, modify and return the map as follows: if the key "ice cream" has a value, set that as the value for the key "yogurt" also. If the key "spinach" has a value, change that value to "nuts".
Format
Input
Output
Samples
"ice cream": "cherry"
{"yogurt": "cherry", "ice cream": "cherry"}
"spinach": "dirt" "ice cream": "cherry"
{"yogurt": "cherry", "spinach": "nuts", "ice cream": "cherry"}
"yogurt": "salt"
{"yogurt": "salt"}
Limitation
1s, 1024KiB for each test case.