slot machine 2.0 hackerrank solution