This is a partial judge problem.
In this problem, you have to implement some power function in class special_power:
Note that n is a member in class special_power.
The definition of sn:
Repeat the elements of s n times, and connect them
For example:
The definition of sn % m:
Repeat the elements of s n times, and connect them.
If the lenth of sn is longer than m, ignore the remaining elements.
For example:
The input has only one line, contains three integer x, n, m and one string s.
For all testcase:
The output has five lines.
The 1st line, output the result of xn % 880301
The 2nd line, output the result of xn % m
The 3rd line, output the result of 2n % 880301
The 4th line, output the result of sn
The 5th line, output the result of sn % m