{
"amount": "368.25",
"fx_rate": "2.50"
}rounding_modeROUND_HALF_EVEN
from decimal import Decimal
def solve(inputs, rounding_mode):
amount = Decimal(inputs['amount'])
fx_rate = Decimal(inputs['fx_rate'])
converted = amount * fx_rate
return converted.quantize(Decimal('0.01'), rounding=rounding_mode)
Convert `amount` (source currency) into the target currency using fixed exchange rate `fx_rate`, rounding the converted amount to exactly 2 decimal places using rounding_mode. Return the result as a decimal string with exactly 2 decimal places.