130D.md (511B)
1 Source: https://codeforces.com/problemset/problem/130/D 2 3 D. Exponentiation 4 5 time limit per test 6 7 2 seconds 8 9 memory limit per test 10 11 64 megabytes 12 13 input 14 15 stdin 16 17 output 18 19 stdout 20 21 You are given integers *a*, *b* and *c*. Calculate *a**b* modulo *c*. 22 23 Input 24 25 Input data contains numbers *a*, *b* and *c*, one number per line. Each number is an integer between 1 and 100, inclusive. 26 27 Output 28 29 Output *a**b* mod *c*. 30 31 Examples 32 33 Input 34 35 ``` 36 2 37 5 38 40 39 ``` 40 41 Output 42 43 ``` 44 32 45 ``` 46 47 Input 48 49 ``` 50 2 51 5 52 26 53 ``` 54 55 Output 56 57 ``` 58 6 59 ```