102012: [AtCoder]ABC201 C - Secret Number

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Score : $300$ points

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.


Sample Input 1

ooo???xxxx

Sample Output 1

108

Some of the possible PINs are 0123 and 0021.


Sample Input 2

o?oo?oxoxo

Sample Output 2

0

There may be no possible PINs, in which case the answer is $0$.


Sample Input 3

xxxxx?xxxo

Sample Output 3

15

Input

题意翻译

## 题目描述 高桥忘记了密码。密码是由 $ 0 $ 到 $ 9 $ 之间的数字组成的四位字符串,有时从 $ 0 $ 开始。 对于从 $ 0 $ 到 $ 9 $ 的各数字,高桥有如下要求。密码的要求由长度为 $ 10 $ 的字符串 $S_0 S_1 \ldots S_9 $表示。 要求的表示方法: - $ S_i $ 为 `o` 时:数字 $ i $ 确实包含在密码中。 - $ S_i $ 为 `x` 时:数字 $ i $ 没有包含在密码中。 - $ S_i $ 为 `?` 时:不知道数字 $ i $ 是否包含在密码中 高桥的密码可能有多少种结果? ## 输入格式 输入 $ S $ 。 ## 输出格式 输出答案。 ### 约束条件 $ S $ 是由 `o`, `x`, `?` 组成的长度为 $ 10 $ 的字符串 ### 样例1解释 例如 `0123` 和 `0021` 等。 ### 样例2解释 可能的密码不存在,即答案可能等于 $ 0 $ 。

加入题单

算法标签: