Opening your workspace…
Workspace/Coding room
Opening your workspace…
The belfry takes messages in digits. A single bell can spell any letter from A (1) through Z (26), but the new bellringer forgot the spaces between letters. Count the ways to split the message into letter codes. Each code uses its ordinary decimal spelling, so a zero can only travel behind a one or a two. Practice rank · 5 kyu (Brewery estimate).
"111"OUTPUT3AAA, AK and KA all ring the same peal.
"100"OUTPUT0No letter can take the last zero.
Try ending a reading with one digit, then with two. Which earlier readings can each ending extend?
function solve(message) { // Write your answer here. }
Tab inserts two spaces. Shift+Tab outdents. Use the arrow keys and Tab to choose a suggestion. Press Escape, then Tab, to leave the editor. Press Control or Command with apostrophe to run samples or with Enter to submit.
"111"3