Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- reverse(s.begin(), s.end());
- for (int i = s.size() - 1; i >= 0; i--) {
- if (s[i] >= '0' && s[i] <= '9')
- n += (s[i] - 48) * pow(base, i);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement