Picotron, your Grandparents’ Favourite Heavy Metal Band

While Heavy Metal has found mainstream success over the last decades, bringing to stardom thousands of bands with a sonic palette based on distorted riffs and screaming voices, it stills finds it hard to reach popularity in certain demographics. For instance, recent market studies show that it is sadly still uncommon to see death metal acts perform at retirement homes, depriving our elders from the pleasure of growling vocals.

image

It is for this that the industry sees with great hopes the rise of Picotron, a shier take on heavy metal whose call to fame is based on bold statements like “Our amplifiers only go to 4—I guess we can get them to 5 if you insist, but you should ask us with pretty please…” and good ol’ cologne scent that makes their live performances a holistic sensory experience.

Naturally, not everyone agrees with this new take that metal is taking, and comparisons to other bands with stronger sounds like Kilotron, Megatron, Tron, or even Yottazettapetatron quickly emerged, criticising the lame sound of Picotron and their surrender of values that were uncompromisable up until now.

Can you help the musical press express their comparisons more accurately in this acoustic tug-of-war?

Input

Input consists of several cases, each on its own line and made up of only lowercase letters, with the comparison a musical journalist wants to make, consisting of:

0.55 Following the trend set by Picotron, all heavy metal acts that are hot nowadays have a name consisting of zero or more SI prefixes with “tron” attached at the end. (Those metric prefixes are the ones standardised by the International System of Units, and are shown to the right.)

The number of bands in each comparison will be between 1 and 100. The number of prefixes in each name will be between 0 and 100.

0.45

Prefix Value Prefix Value
quetta 103010^{30} quecto 10−3010^{-30}
ronna 102710^{27} ronto 10−2710^{-27}
yotta 102410^{24} yocto 10−2410^{-24}
zetta 102110^{21} zepto 10−2110^{-21}
exa 101810^{18} atto 10−1810^{-18}
peta 101510^{15} femto 10−1510^{-15}
tera 101210^{12} pico 10−1210^{-12}
giga 10910^{9} nano 10−910^{-9}
mega 10610^{6} micro 10−610^{-6}
kilo 10310^{3} milli 10−310^{-3}

Output

For each case, express the value of the left part of the comparison as the number of times the target band it is equivalent to (assuming the prefixes directly correspond to musical quality).

Print the number without unnecessary leading or trailing zeros, and with a dot ‘.’ separating the integer and fractional parts. Don’t include a dot if it isn’t needed either.

Problem information

Author: Edgar Gonzalez
Event: Vint-i-quatrè Concurs de Programació de la UPC - Final
Date: 2026-10-07

Generation: 2026-09-29T14:35:00.220Z

© Jutge.org, 2006–2026.
https://jutge.org