It's super effective! In Pokémon there are 18 types:

Normal    Fighting  Flying  Poison  Ground  Rock
Bug       Ghost     Steel   Fire    Water   Grass
Electric  Psychic   Ice     Dragon  Dark    Fairy


A Pokémon can have single or dual typing. For example, Pikachu is Electric, and Tyranitar is Rock/Dark. The order of the types does not matter. A Pokémon can't have the same type twice. An attacking move has exactly one of the above 18 types.


Some Pokémon types are weak to a certain type of attack. For example, a Fire Pokémon is weak against Water attacks. This gives a damage multiplier of 2.
Some Pokémon types are resistant to a certain type of attack. For example, a Rock Pokémon is resistant against a Normal attack. This gives a damage multiplier of 0.5.
Some Pokémon types are immune to a certain type of attack. For example, a Flying Pokémon is immune against a Ground attack. This gives a damage multiplier of 0.


A pokemon can be doubly weak, doubly resistant or any other combination against an attacking type. Multiply the multipliers to get a total effectiveness.

Write a program or function that given a move type and a Pokémon typing outputs the total damage multiplier of the attack. A Pokémon typing is always written either as A or A/B, where A and B are distinct types from the list above. You must accept the Pokémon typing in this format. Other than this restriction you may take input in any reasonable manner. An example input format that acceptable is:

"Ice", "Dragon/Flying"


But this is unacceptable:

["Ice", ["Dragon", "Flying"]]


Your output must be exactly one of the following strings, followed by an optional trailing newline:

0x    0.25x    0.5x    1x    2x    4x


Examples

Ground, Fire -&gt; 2x
Normal, Rock/Dragon -&gt; 0.5x
Fighting, Ghost/Steel -&gt; 0x
Steel, Water/Steel -&gt; 0.25x
Ice, Dragon/Flying -&gt; 4x
Water, Ground/Water -&gt; 1x
Ghost, Ghost -&gt; 2x


Type effectiveness

For a human-friendly type chart I'd like to refer you to Gamepedia. To make the golfing process a bit faster I'll give you a compressed computer-friendly matrix of effectiveness. Divide every number by two to get the true multiplier (1 -> 0.5, 4 -> 2):

              Defending type
               (same order)

   Normal   222221201222222222
   Fighting 421124104222214241
A  Flying   242221421224122222
t  Poison   222111210224222224
t  Ground   220424124421422222
a  Rock     214212421422224222
c  Bug      211122211124242241
k  Ghost    022222242222242212
i  Steel    222224221112124224
n  Fire     222221424114224122
g  Water    222244222411222122
   Grass    221144121141222122
T  Electric 224202222241122122
y  Psychic  242422221222212202
p  Ice      224242221114221422
e  Dragon   222222221222222420
   Dark     212222242222242211
   Fairy    242122221122222442




Shortest code in bytes wins.
Java, 663 639 582 bytes

String f(String...a){float d=1;for(String B:a[1].split(&quot;/&quot;))d*=(&quot;222221201222222222421124104222214241242221421224122222222111210224222224220424124421422222214212421422224222211122211124242241022222242222242212222224221112124224222221424114224122222244222411222122221144121141222122224202222241122122242422221222212202224242221114221422222222221222222420212222242222242211242122221122222442&quot;.charAt(g(a[0])*18+g(B))-48)*.5;return(d+&quot;x&quot;).replace(&quot;.0&quot;,&quot;&quot;);}int g(String a){int i=0;for(;i&lt;18;i++)if(a.contains(&quot;N,gh,ly,oi,ou,ck,B,ho,S,re,W,G,E,P,I,g,k,y&quot;.split(&quot;,&quot;)[i]))break;return i;}

There's a simple lookup table that takes much of the room. It just finds the correct types and multiplies it out. Call it like this:
f(&quot;Water&quot;,&quot;Ground/Fire&quot;)

With some line breaks it looks like this:
String f(String...a){
    float d=1;
    for(String B:a[1].split(&quot;/&quot;))
        d*=(&quot;222221201222222222421124104222214241242221421224122222222111210224222224220424124421422222214212421422224222211122211124242241022222242222242212222224221112124224222221424114224122222244222411222122221144121141222122224202222241122122242422221222212202224242221114221422222222221222222420212222242222242211242122221122222442&quot;
                .charAt(g(a[0])*18+g(B))-48)*.5;
    return(d+&quot;x&quot;).replace(&quot;.0&quot;,&quot;&quot;);
}

int g(String a){
    int i=0;
    for(;i&lt;18;i++)
        if(a.contains(&quot;N,gh,ly,oi,ou,ck,B,ho,S,re,W,G,E,P,I,g,k,y&quot;.split(&quot;,&quot;)[i]))
            break;
    return i;
}