マイナビプログラミングコンテスト2021(AtCoder Beginner Contest 201)
C
Secret Number
AtCoder
⌀ 439
原题
← BD →
翻译中…

Problem Statement

翻译中…

Takahashi has forgotten his PIN. The PIN is a four-digit string consisting of 0, 1, $\ldots$, 9, and may begin with a 0.

翻译中…

For each digit 0 through 9, Takahashi remembers the following fact, represented by a $10$-character string $S_0S_1 \ldots S_9$:

翻译中…
  • if $S_i$ is o: he is certain that the PIN contained the digit $i$;
  • if $S_i$ is x: he is certain that the PIN did not contain the digit $i$;
  • if $S_i$ is ?: he is not sure whether the PIN contained the digit $i$.
翻译中…

How many strings are there that could be Takahashi's PIN?

翻译中…

Constraints

翻译中…
  • $S$ is a $10$-character string consisting of o, x, and ?.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

S

翻译中…

Output

翻译中…

Print the answer.

翻译中…

样例

Input #1
ooo???xxxx
Output #1
108
Some of the possible PINs are `0123` and `0021`.
Input #2
o?oo?oxoxo
Output #2
0
There may be no possible PINs, in which case the answer is $0$.
Input #3
xxxxx?xxxo
Output #3
15
题目信息
题号
abc201_c
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。