{"problem":{"name":"G. Generative Model","description":{"content":"Bob is creating an algorithm that can generate words. It works as follows: Given an integer seed s: For example, if s = 3705 From B we can generate \"mico\" as follows: [13, 9, 3, 15 = [m, i, c, o]] ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":65536},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10146G"},"statements":[{"statement_type":"Markdown","content":"Bob is creating an algorithm that can generate words. It works as follows:\n\nGiven an integer seed s:\n\nFor example, if s = 3705\n\nFrom B we can generate \"mico\" as follows: [13, 9, 3, 15 = [m, i, c, o]]\n\nFrom B we can also generate \"kecci\" as follows: [11, 5, 3, 3, 9 = [k, e, c, c, i]]\n\nPlease note that when doing the words-number trailing zeroes are not allowed. For example, 02 does not correspond to b.\n\nAlice thinks that Bob's model is very poor and that in fact, it can't generate words that belongs to any language. Bob is very confident about his model, that's why he wants to write a program that given s computes how many words can be generated. As Bob knows you are training to participate on the ACM - ICPC World Finals, he wants you to write a program that counts the possible words.\n\nThere will be multiple cases. Each line contains a positive integer s less than 106.\n\nFor each case output the number of valid words mod 109 + 7 on a single line.\n\n## Input\n\nThere will be multiple cases. Each line contains a positive integer s less than 106.\n\n## Output\n\nFor each case output the number of valid words mod 109 + 7 on a single line.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ s \\in \\mathbb{Z}^+ $ with $ s < 10^6 $.  \nLet $ \\Sigma = \\{1, 2, \\dots, 26\\} $ represent the alphabet (A=1, B=2, ..., Z=26).  \nA *valid word* is a sequence $ (d_1, d_2, \\dots, d_k) \\in \\Sigma^k $ for some $ k \\geq 1 $, such that:  \n$$\ns = \\sum_{i=1}^{k} d_i \\cdot 10^{k-i}\n$$  \n(i.e., $ s $ is the base-10 number formed by concatenating the digits $ d_1, d_2, \\dots, d_k $, with no leading zeros and each $ d_i \\in \\Sigma $).\n\n**Constraints**  \n1. $ 1 \\leq s < 10^6 $  \n2. Each digit $ d_i \\in \\{1, 2, \\dots, 26\\} $  \n3. No leading zero: $ d_1 \\geq 1 $ (automatically satisfied since $ d_i \\in \\Sigma $)  \n\n**Objective**  \nFor a given $ s $, count the number of sequences $ (d_1, \\dots, d_k) \\in \\Sigma^k $ such that the decimal concatenation of the digits equals $ s $.  \nOutput the count modulo $ 10^9 + 7 $.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10146G","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}