here you have MPOWER problem statement:
{assign var="code" value="MPOWER"}
{if $par=="polski"}{literal}
Dla danych liczb x, y oraz n wyznacz
xy mod
n,
czyli liczbę r taką, że 0 <= r < n oraz n | (xy - r).
Wejście
t [liczba przypadków testowych <= 10]
x y n [2 <= x, n <= 230, 0 <= y <= 230 - łatwe (1010000 - trudne)
Pierwsze dwa testy są łatwe, kolejne cztery są trudne. Limit punktów (zadanie zostaje zaakceptowane) wynosi 2 pkt.
Wyjście
r [takie, że xy = r (mod n)]
Przykład 1 (łatwy)
<strong>Wejście:</strong>
2
54015779 489100829 472960975
827371214 966345673 443599139
<strong>Wyjście:</strong>
350431544
391669493
Przykład 2 (trudny)
<strong>Wejście:</strong>
1
29809803 47901912849872523461864631327232122 1008098565
<strong>Wyjście:</strong>
718185534
{/literal}{else}{literal}
For a given numbers x, y and n calculate
xy mod
n,
i.e. a number r such that 0 <= r < n and n | (xy - r).
Input
t [the number of test cases <= 10]
x y n [2 <= x, n <= 230, 0 <= y <= 230 - easy (1010000 - hard)
First two test cases are easy, the following four test cases are hard. Threshold is 2 pts (the problem is accepted).
Output
r [such that xy = r (mod n)]
<strong>Input:</strong>
2
54015779 489100829 472960975
827371214 966345673 443599139
<strong>Output:</strong>
350431544
391669493
Example 2 (hard)
<strong>Input:</strong>
1
29809803 47901912849872523461864631327232122 1008098565
<strong>Output:</strong>
718185534
{/literal}{/if}