Your task is given an input string of the full/short name of a CS:GO (Counter-Strike: Global Offensive, a computer game) rank return an integer from 1-18 representing the rank number. A higher number means you are a higher rank and so "better" at CS:GO.
A string representing either the full name or short name of the CS:GO rank. Your code must be able to handle both cases.
An integer representing the rank number of the given input. You can output in either 0-indexing or 1-indexing as 0-17 and 1-18 respectively.
The test cases use 1 - 18 as the output, just subtract one if you are using 0-indexing. Where SN means short name.
Full name SN -> output Silver I S1 -> 1 Silver II S2 -> 2 Silver III S3 -> 3 Silver IV S4 -> 4 Silver Elite SE -> 5 Silver Elite Master SEM -> 6 Gold Nova I GN1 -> 7 Gold Nova II GN2 -> 8 Gold Nova III GN3 -> 9 Gold Nova Master GNM -> 10 Master Guardian I MG1 -> 11 Master Guardian II MG2 -> 12 Master Guardian Elite MGE -> 13 Distinguished Master Guardian DMG -> 14 Legendary Eagle LE -> 15 Legendary Eagle Master LEM -> 16 Supreme Master First Class SMFC -> 17 Global Elite GE -> 18