Currency Exchange Query Conversion

Given currency exchange rates and conversion queries, compute the amount of target currency obtainable for each query.

Each rate A B r means that **1 unit of currency A can be exchanged for r u...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: