1. Java / Говнокод #23703

    +1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    решение:
    class Twofer {
        String twofer(String name) {
            if (name.equalsIgnoreCase("Alice")){
                return "One for Alice, one for me.";
            } else if (name.equalsIgnoreCase("Bob")) {
                return "One for Bob, one for me.";
            } else {
                return "One for you, one for me.";
            }
        }
    }
    
    
    чтобы эти тесты проходили

    задачка:
    # Two Fer

    `Two-fer` or `2-fer` is short for two for one. One for you and one for me.

    ```text
    "One for X, one for me."
    ```

    When X is a name or "you".

    If the given name is "Alice", the result should be "One for Alice, one for me."
    If no name is given, the result should be "One for you, one for me."


    чувак решил не заморачиваться...

    Запостил: Lure Of Chaos, 03 Февраля 2018

    Комментарии (70) RSS

    Добавить комментарий