| 
| There is a contest! |  | В настоящий момент идёт турнир. Некоторая информация и функции сервера недоступны до его окончания. 
 |  
 | 
| imesecan | July.16.2015 at 11:52:03 AM |  |  | 0 | --- Test Case 1 --- 7 8 9
 
 --- Pattern ---
 4
 
 
 |  | imesecan | Nov.17.2015 at 01:28:53 PM |  |  | 1 | a 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
 
 
 |  
 |