HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Forums > Discussion of problems > topic:


Problem "50379 - a^b modulus k"

There is a contest!

В настоящий момент идёт турнир. Некоторая информация и функции сервера недоступны до его окончания.

imesecanJuly.16.2015 at 11:52:03 AM
0--- Test Case 1 ---
7 8 9

--- Pattern ---
4

imesecanNov.17.2015 at 01:28:53 PM
1a is the number and b is the power for example
5^3 is possible and it means 5*5*5,

you should calculate modulus operation on every step
(5*5 % k) * 5%k...
etc.

Test Case 5:
---------- input.txt ----------
50 34 31

---------- pattern.txt ----------
28


www.contester.ru