We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Strings
- The Minion Game
- Discussions
The Minion Game
The Minion Game
Sort by
recency
|
1259 Discussions
|
Please Login in order to post a comment
Something a little bit different, the total possible score can be caluclated using the arithmetic series formula (
total = (n * (n+1) ) // 2
). This allows Stuart's score to be caluclated as every point that Kevin didn't get.Code:
The rules give each player a distinct focus—consonants for Stuart and vowels for Kevin—adding a strategic layer that makes things more interesting. Betbook250 login
and understand this : posible combination of substrIng in a string that is the cycle do, so : 'B,A,N,A,N,A' 0 (get 6 substring): * 'B' , 'BA' , 'BAN' , 'BANA' , 'BANAN' , 'BANANA'* 1 (get 5 substring):** 'A' , 'AN' , 'ANA' , 'ANAN' , 'ANANA** 2 (get 4 substring): * 'N' , 'NA' , 'NAN' , 'NANA'* 3 (get 3 substring):** 'A' , 'AN' , 'ANA'** 4 (get 2 substring): * 'N' , 'NA' * 5 (get 1 substring): ** 'A'**
NOW AS you can see they start in vowey or not vowel so if you sum you get result ,
Here's my code: