Before we jump into security concepts, let us familiarize ourselves with the mathematical background required for it.
Set is a collection of elements. Here, is one such example. A collection of integers is also a set.
Given two sets, and , we define a function that maps every element in to precisely element in .
If and , the function will return:
, and .
Let us define a function , where and .
Here, is defined as the remainder of when divided by .
Your task is to complete the function that takes the input and returns
Constraints