Submit | All submissions | Best solutions | Back to list |
EPO - Easy Powers |
Calculating ab can be done using the recurrence f(a,b) such that if b > 0 f(a,b) = a*f(a,b-1) while if b = 0 then f(a,b) = 1.
Input
Two numbers in one lines separated by a space a (1<=a<=10) and b (1<=b<=12)
Output
One number which is the value of ab
Example
Input: 3 9 Output:1968319683
Added by: | Omar ElAzazy |
Date: | 2012-03-14 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |