Sha256: f49f37618f4500885492d69583f1a26f3e68f379246497f46a491322a23353db

Contents?: true

Size: 1.35 KB

Versions: 11

Compression:

Stored size: 1.35 KB

Contents

{
    "solve": {
        "description": "Solve the alphametics puzzle",
        "cases": [
            {
                "description": "solve short puzzle",
                "puzzle": "I + BB == ILL",
                "expected": { "I": 1, "B": 9, "L": 0 }
            },
            {
                "description": "solve long puzzle",
                "puzzle": "SEND + MORE == MONEY",
                "expected": { "S": 9, "E": 5, "N": 6, "D": 7, "M": 1, "O": 0, "R": 8, "Y": 2 }
            },
            {
                "description": "solution must have unique value for each letter",
                "puzzle": "A == B",
                "expected": null
            },
            {
                "description": "leading zero solution is invalid",
                "puzzle": "ACA + DD == BD",
                "expected": null
            },
            {
                "description": "solve puzzle with four words",
                "puzzle": "HE + SEES + THE == LIGHT",
                "expected": { "E": 4, "G": 2, "H": 5, "I": 0, "L": 1, "S": 9, "T": 7 }
            },
            {
                "description": "solve puzzle with many words",
                "puzzle": "AND + A + STRONG + OFFENSE + AS + A + GOOD = DEFENSE",
                "expected": { "A": 5, "D": 3, "E": 4, "F": 7, "G": 8, "N": 0, "O": 2, "R": 1, "S": 6, "T": 9 }
            }
        ]
    }
}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
trackler-2.0.0.1 common/exercises/alphametics/canonical-data.json
trackler-2.0.0.0 common/exercises/alphametics/canonical-data.json
trackler-1.0.4.1 common/exercises/alphametics/canonical-data.json
trackler-1.0.4.0 common/exercises/alphametics/canonical-data.json
trackler-1.0.3.0 common/exercises/alphametics/canonical-data.json
trackler-1.0.2.1 common/exercises/alphametics/canonical-data.json
trackler-1.0.2.0 common/exercises/alphametics/canonical-data.json
trackler-1.0.1.2 common/exercises/alphametics/canonical-data.json
trackler-1.0.1.1 common/exercises/alphametics/canonical-data.json
trackler-1.0.1.0 common/exercises/alphametics/canonical-data.json
trackler-1.0.0.1 common/exercises/alphametics/canonical-data.json