Problem C
XOR Equation

Once there was a great general Paul who issued the following warning:
Suppose aliens invade the earth and threaten to obliterate it in a year’s time unless human beings can find the Ramsey number for red five and blue five. We could marshal the world’s best minds and fastest computers, and within a year we could probably calculate the value. If the aliens demanded the Ramsey number for red six and blue six, however, we would have no choice but to launch a preemptive attack.
However this time, when the aliens come, they only write
down a single line of XOR equation in the form of
Input
The input has a single line that contains the XOR equation
Output
Output the number of ways in which the XOR equation can be satisfied after all the question marks are replaced by digits.
Sample Input 1 | Sample Output 1 |
---|---|
?3 xor 1? = ? |
10 |