cho.sh
Notes
Loading...

Resistance

Time limit

2s

Memory limit

128 MB

Problem

Electronic devices contain resistors. A resistor is marked with three colors, and those colors determine its resistance in ohms. The first two colors form a two-digit value, and the third color gives the multiplier. Use the following table to interpret each color.

ColorValueMultiplier
black01
brown110
red2100
orange31,000
yellow410,000
green5100,000
blue61,000,000
violet710,000,000
grey8100,000,000
white91,000,000,000

Input

The first line contains the first color, the second line contains the second color, and the third line contains the third color. Every input color appears in the table above.

Output

Print the resistance value calculated from the three given colors.