Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2019/iii/paper-324/2/b/ii/solution

Applying the two modular-addition quantum oracles consecutively adds to the answer register. Thus
Let . Applying , then , then gives
Therefore
using one query and two unitary operators independent of . This is modular-oracle inversion by negation.

New to topics? Read the docs here!