harbor run -t openthoughts/tasktrove-code-contests-noblock-code_contests-1794
harbor download openthoughts/tasktrove-code-contests-noblock-code_contests-1794
You are given integers a, b and c. Calculate ab modulo c.
Input
Input data contains numbers a, b and c, one number per line. Each number is an integer between 1 and 100, inclusive.
Output
Output ab mod c.
Examples
2 5 40
32
2 5 26
6
Solve this competitive programming problem.
Write a complete, self-contained Python solution to /app/solution.py.
/app/solution.py
Your solution must:
Important: Your solution will be executed non-interactively as:
python3 /app/solution.py < input.txt
Do not use input() in a loop that waits for interactive input. Read all input at once (e.g. import sys; data = sys.stdin.read()) and process it.
input()
import sys; data = sys.stdin.read()
The solution will be validated against multiple test cases.