401689: GYM100514 A Bank
Memory Limit:64 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
A. Banktime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard output
You are given an encrypted number, encrypted using a certain algorithm.Decrypt it !
InputThe first line contains keys, n, e (1 ≤ n, e ≤ 106).
Next line contains encrypted number
OutputPrint the original number.
ExamplesInput2461 2007Output
2097
2175Input
65783 58199Output
53581
12356Input
409763 128561Output
82222
311454