{"problem":{"name":"Digits Parade","description":{"content":"Given is a string $S$. Each character in $S$ is either a digit (`0`, ..., `9`) or `?`. Among the integers obtained by replacing each occurrence of `?` with a digit, how many have a remainder of $5$ wh","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc135_d"},"statements":[{"statement_type":"Markdown","content":"Given is a string $S$. Each character in $S$ is either a digit (`0`, ..., `9`) or `?`.\nAmong the integers obtained by replacing each occurrence of `?` with a digit, how many have a remainder of $5$ when divided by $13$? An integer may begin with $0$.\nSince the answer can be enormous, print the count modulo $10^9+7$.\n\n## Constraints\n\n*   $S$ is a string consisting of digits (`0`, ..., `9`) and `?`.\n*   $1 \\leq |S| \\leq 10^5$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$S$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc135_d","tags":[],"sample_group":[["??2??5","768\n\nFor example, $482305, 002865,$ and $972665$ satisfy the condition."],["?44","1\n\nOnly $044$ satisfies the condition."],["7?4","0\n\nWe may not be able to produce an integer satisfying the condition."],["?6?42???8??2??06243????9??3???7258??5??7???????774????4?1??17???9?5?70???76???","153716888"]],"created_at":"2026-03-03 11:01:14"}}