Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inline int nFirstDigitsOfPower(int a, int b, int n) {
- double x = b * log10(a);
- double y = floor(pow(10, x - floor(x) + n - 1));
- return int(y);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement