  In this paper, we consider a quantum algorithm for solving the following
problem: ``Suppose $f$ is a function given as a black box (that is also called
an oracle) and $f$ is invariant under some AND-mask. Examine a property of $f$
by querying the oracle.'' We compare the efficiency of our quantum algorithm
with that of classical algorithms by evaluating the expected number of queries
for each algorithm. We show that our quantum algorithm is more efficient than
any classical algorithm in some cases. However, our quantum algorithm does not
exhibit an exponential speedup in the size of an input, compared with the best
classical algorithm. Our algorithm extracts a global property of $f$ (that is,
invariance of $f$) while it neglects local properties of $f$ (that is, outputs
of $f$). We can regard our algorithm as an application of Simon's algorithm.
