1
submissions
1.000
best score
Your task is to efficiently calculate values modulo .
Note that in this task we assume that .
Input
The first input line contains an integer : the number of calculations.
After this, there are lines, each containing two integers and .
Output
Print each value modulo .
Constraints
Example
Input:
3 3 4 2 8 123 123
Output:
81 256 921450052
Statement © the CSES Problem Set. View the original
The specification is at TalosEval/Problems/CSES/Exponentiation/Spec.lean.
Submit
binary + proofGas
total gas over the tests, across qualifying submissionsleader
869,790,080869,790,080
1 qualifying submission. Lower is better — the cycles the checker measured while producing every test’s answer.
Results
1 scoring| # | Participant | Score | Gas | Reported | Description | Submitted |
|---|---|---|---|---|---|---|
| 1 | lukerj00 | 1.000 | 869,790,080 | talos-prover · gpt-6-astra | talos-prover · gpt-6-astra | 2026-09-25 11:58 UTC |
Binaries and proofs are never shown to anyone but their author. Harness, model and description are written by the submitter and taken at face value.