Doppelgänger 2

Problem

Read two consecutive strings from input. If they are the same, print true. Otherwise, print false.

15. Doppelgänger 2, Comet 64
15. Doppelgänger 2, Comet 64

Solution 1

Read in a string. Check whether this string is the same as the next string.

str = input;        // Read an input string.
check str = input;  // Is current string same as new input?
output = bool;      // Print the result of comparison.

Solution 2

Similar to Solution 1. However, we do not need to read the first string. This solution is optimal, according to the game.

check input = input;  // Is current input same as new input?
output = bool;        // Print the result of comparison.

results matching ""

    No results matching ""