Unit Conversion II

There are n unit types numbered from 0 to n - 1, where unit 0 is the base unit.

You are given conversions, where each entry [source, target, factor] means:

One unit of source is equa...

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: