CT35031

The Cipher Readings Beneath Lodebarrow

MediumL5 · Recursion RenegadeAcceptance: 0.0%XP: 60

Uma found an old ledger of stairwells in the bakery attic at the silver mines of Lodebarrow. The margin notes pose a precise question. Task: Digits encode letters: 1->A ... 26->Z. Print the number of ways to decode the digit string mod 1000000007. Input format: One line with a digit string s. Output format: Print the decode count mod 1000000007. Constraints: 1 <= |s| <= 1000; s contains digits 0-9.

Example 1:

Input: 66906540066169527341057394830167265996499990022945332364071074009939163799076830066453242674366673183634073690207213363206681959905565152409976980012613151029591345948113666452863728769448370423622815464548586148916634360402961315908334446187800192443672374018759859802383705840130744334168363163863971638913234705663672921483899232790567920170965786909905986689144567843835067818718861705857382960991348711089358155505223506609497172719651771128415909893571722580248602876890989121517791898894192118706231426021574504757295309484206953247944075369809046264278352805959977176080235675283991814250017602365302938077160473612644002194255828245273944759940098240756464340965577315160910804968457656185590271551363712159591774588010132139647005749399847932006995086770161397488050086630771719419117261635…
Output: 0

Example 2:

Input: 5474655784500358755219917256119575904606240778097632192848824003514651239398518540460154118651212875871851703851061629670527408513222071203988344374355319128556322969031579806460306796735147547050170863718898502450216621655496735842224318182641576013519679783694251907232646553522090580754629587609812892705580788234532042254856549416658583498136568757416813325634930527097827697267571431539656983751963957125469305751040451079010899876562579736286431691491318609157763
Output: 0

Example 3:

Input: 22042325581926777934701752884152119907666065315926569252366005499856725817345822596479156859318409490476748285320338719285840237446770736604986452814075503832221483630887830032999413879635471516026387963437143125297098796182986832310215104355012429
Output: 0

Constraints:

1 <= |s| <= 1000; s contains digits 0-9.

Loading...
Test Cases:No test cases
No test cases available.