3 ms·
I am still wondering how the two Perl ones work with two missing words in the code.
by giancarlostoro 7y ago
I am still wondering how the two Perl ones work with two missing words in the code.
- maxander 7y agoSince each hand beats two other hands, you only need three possible outputs to beat any opposing hand.
- avip 7y agoThe conclusion does not follow... (the missing condition is that every hand is beatable)
- personjerry 7y agoThere are 5 possible hands Each hand beats 2 distinct hands With 3 distinct hands you can cover up to 6 distinct hands which is a superset of all possible hands 3 * 2 > 5
- avip 7y agoAnd yet... A --> D | E B --> D | E C --> D | E D --> C | E E --> D | C QED
- personjerry 7y agoUm, this isn't a general math problem; We're not solving for all possible sets. We're solving this problem in particular: A --> B | C B --> C | D C --> D | E D --> E | A E --> A | B
- dragontamer 7y agoRock: 4-letters (Mod4 == 0) Paper: 5-letters (Mod4 == 1) Spock: 5-letters (Mod4 == 1) Lizard: 6-letters (Mod 4 == 2) Scissors: 8-letters (Mod 4 == 0) ---------- There are no 3-letter or 7-letter words (aka: Blah % 4 != 3 given the inputs). So they just left the 3rd index (4th word) empty.
- paggle 7y agoThe question is not clear. You don’t need to output the string “Rock or Spock”, you need to output either the string “Rock” or the string “Spock”.