← All problemsSign in

Modular Arithmetic Queries 1

As the name suggests, this problem is based on Modular Arithmetic Operations. You'll be given $Q$ queries. In each query, you have to perform a Modular Arithmetic Operation and print the result of that operation. The queries can be in any of the following five types: - + A B M: In this query, you've to print the value of $(A+B)\mod M$. - * A B M: In this query, you've to print the value of $(A*B)

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start