Problem Statement
You are given an integer and two positive integers and that are coprime.
For arbitrary integer satisfying , calculate .
Constraints
- Results must be returned as a Python's list in the form of [, , ].
- The submitted code must follow the specified format:
def solve(n: int, a: int, L: int) -> list[int]:
result: list[int] = []
# Write your code here:
return result