From e941c53fccfec969f331d22d258a045d29a1370a Mon Sep 17 00:00:00 2001 From: Glenn Jackman Date: Sun, 16 Aug 2026 20:54:59 -0400 Subject: [PATCH] fix alphametics docs --- .../alphametics/.docs/instructions.append.md | 29 ++++++++++++++++ .../alphametics/.docs/instructions.md | 34 ++----------------- .../practice/alphametics/.meta/config.json | 4 +-- 3 files changed, 32 insertions(+), 35 deletions(-) create mode 100644 exercises/practice/alphametics/.docs/instructions.append.md diff --git a/exercises/practice/alphametics/.docs/instructions.append.md b/exercises/practice/alphametics/.docs/instructions.append.md new file mode 100644 index 0000000..0407f64 --- /dev/null +++ b/exercises/practice/alphametics/.docs/instructions.append.md @@ -0,0 +1,29 @@ +# ignore me + +## Input + +Your script will receive the alphametic puzzle as a single string via +standard input (stdin). The puzzle string follows the format +`WORD1 + WORD2 + ... == RESULT`. + +For example: + +```text +SEND + MORE == MONEY +``` + +## Output + +If the puzzle has a solution, print a single line consisting of +space-separated `LETTER=DIGIT` pairs, sorted alphabetically by letter. + +For the example above, the output should be: + +```text +D=7 E=5 M=1 N=6 O=0 R=8 S=9 Y=2 +``` + +If the puzzle has multiple valid solutions, printing any one of them is +acceptable. + +If the puzzle has no solution, print nothing (an empty line). diff --git a/exercises/practice/alphametics/.docs/instructions.md b/exercises/practice/alphametics/.docs/instructions.md index 596878a..ef2cbb4 100644 --- a/exercises/practice/alphametics/.docs/instructions.md +++ b/exercises/practice/alphametics/.docs/instructions.md @@ -22,38 +22,8 @@ Replacing these with valid numbers gives: 1 0 6 5 2 ``` -This is correct because every letter is replaced by a different number and the -words, translated into numbers, then make a valid sum. +This is correct because every letter is replaced by a different number and the words, translated into numbers, then make a valid sum. -Each letter must represent a different digit, and the leading digit of a -multi-digit number must not be zero. - -## Input - -Your script will receive the alphametic puzzle as a single string via -standard input (stdin). The puzzle string follows the format -`WORD1 + WORD2 + ... == RESULT`. - -For example: - -```text -SEND + MORE == MONEY -``` - -## Output - -If the puzzle has a solution, print a single line consisting of -space-separated `LETTER=DIGIT` pairs, sorted alphabetically by letter. - -For the example above, the output should be: - -```text -D=7 E=5 M=1 N=6 O=0 R=8 S=9 Y=2 -``` - -If the puzzle has multiple valid solutions, printing any one of them is -acceptable. - -If the puzzle has no solution, print nothing (an empty line). +Each letter must represent a different digit, and the leading digit of a multi-digit number must not be zero. [alphametics]: https://en.wikipedia.org/wiki/Alphametics diff --git a/exercises/practice/alphametics/.meta/config.json b/exercises/practice/alphametics/.meta/config.json index f10fa3c..fa7fea4 100644 --- a/exercises/practice/alphametics/.meta/config.json +++ b/exercises/practice/alphametics/.meta/config.json @@ -15,7 +15,5 @@ ".meta/example.awk" ] }, - "icon": "crossword", - "source": "Wikipedia", - "source_url": "https://en.wikipedia.org/wiki/Alphametics" + "icon": "crossword" }